We use cookies to ensure you have the best browsing experience on our website. Please read our cookie policy for more information about how we use cookies.
intmain(){stringn_temp;getline(cin,n_temp);intn=stoi(ltrim(rtrim(n_temp)));// Write your code hereif(n<1)cout<<"Lesser than 1";elseif(n==1)cout<<"one";elseif(n==2)cout<<"two";elseif(n==3)cout<<"three";elseif(n==4)cout<<"four";elseif(n==5)cout<<"five";elseif(n==6)cout<<"six";elseif(n==7)cout<<"seven";elseif(n==8)cout<<"eight";elseif(n==9)cout<<"nine";elsecout<<"Greater than 9";return0;}
Cookie support is required to access HackerRank
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 →
Very Basic and Understandable code.