0
What's the error in this program?
It is supposed to take a number from the user and either multiply by 4 or divide by 777 depending on the number entered by the user. Thanks! #include <iostream> using namespace std; int main() { cout << "Welcome " << "To " << "Numbers!" << endl; int x=cin if(x<666){x*4} if()else(x>666){x/777} return 0; }
2 Antworten
+ 11
#include <iostream>
using namespace std;
int main() {
int x;
cout << "Welcome " << "To " << "Numbers!" << endl;
cin>>x;
if(x<666){
x=x*4;
cout<<x;
}
else if(x>666){
x=x/777;
cout<<x;
}
return 0;
}
+ 1
P R Thank You!