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>#include<string>usingnamespacestd;intmain(){stringnumbers[]={"one","two","three","four","five","six","seven","eight","nine"};stringover_respond="Greater than 9";intn;scanf("%d",&n);if((n>=1)&&(n<=9)){cout<<numbers[n-1]<<endl;}elseif(n>9){cout<<over_respond<<endl;}/* TODO * * * n is a positive integer * 1 < n < 9, there is response * n > 9, there is over response * * * */`}
`
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 →
`