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.
#include<iostream>auto&cout=std::cout;auto&cin=std::cin;usingstring=std::string;usingstd::endl;intmain(){intinput;cin>>input;stringoutput=input==1?"one":input==2?"two":input==3?"three":input==4?"four":input==5?"five":input==6?"six":input==7?"seven":input==8?"eight":input==9?"nine":"Greater than 9";cout<<output;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 →
C++ 20