You are viewing a single comment's thread. Return to all comments →
char* number[] = { "one", "two", "three", "four", "five", "six", "seven", "eight", "nine" }; if(n >= 1 && n <= 9){ printf("%s",number[n-1]); } else { printf("Greater than 9"); } easy
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 →
char* number[] = { "one", "two", "three", "four", "five", "six", "seven", "eight", "nine" }; if(n >= 1 && n <= 9){ printf("%s",number[n-1]); } else { printf("Greater than 9"); } easy