You are viewing a single comment's thread. Return to all comments →
using namespace std;
int main() { int x; cin >> x; string kq =(x==1)? "one" : (x==2)? "two" : (x==3)? "three" : (x==4)? "four" : (x==5)? "five" : (x==6)? "six" : (x==7)? "seven" : (x==8)? "eight" : (x==9)? "nine" : "Greater than 9"; cout << kq << endl; }
Seems like cookies are disabled on this browser, please enable them to open this website
Conditional Statements
You are viewing a single comment's thread. Return to all comments →
include
include
using namespace std;
int main() { int x; cin >> x; string kq =(x==1)? "one" : (x==2)? "two" : (x==3)? "three" : (x==4)? "four" : (x==5)? "five" : (x==6)? "six" : (x==7)? "seven" : (x==8)? "eight" : (x==9)? "nine" : "Greater than 9"; cout << kq << endl; }