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<stdio.h>intmain(){shortnumber;scanf("%hd",&number);if(number>9){printf("Greater than 9\n");}else{if(number==1){printf("one\n");}if(number==2){printf("two\n");}if(number==3){printf("three\n");}if(number==4){printf("four\n");}if(number==5){printf("five\n");}if(number==6){printf("six\n");}if(number==7){printf("seven\n");}if(number==8){printf("eight\n");}if(number==9){printf("nine\n");}}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 in C
You are viewing a single comment's thread. Return to all comments →