- 1
Question 2. program that gets a double number from the user, decides whether that number is positive, negative, or zero.
c++
4 Réponses
+ 6
# python srry
num=int(input())
if num > 0:
print("positive")
elif num < 0:
print("negative")
elif num == 0:
print("zero")
# idk about double numbers that sounds stupid
+ 4
double number;
cin >> number;
if (number > 0) {
cout << "Positive" << endl;
}
else if (number < 0) {
cout << "Negative" << endl;
}
else if (number == 0) {
cout << "Zero" << endl;
}
+ 1
What do you mean by double numbers?
0
A doubled number? U mean like 2 4 6 8 10, etc.?