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(){intn;scanf("%d",&n);printf((n==1)?"one":(n==2)?"two":(n==3)?"three":(n==4)?"four":(n==5)?"five":(n==6)?"six":(n==7)?"seven":(n==8)?"eight":(n==9)?"nine":"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 in C
You are viewing a single comment's thread. Return to all comments →
Using Ternary Operator