+ 1

Program

Using switch statement write a C program that accepts an integer value and outputs the number in words

29th Jan 2018, 10:28 AM
Lawrence Edaria
Lawrence Edaria - avatar
4 ответов
+ 1
if it's for a single digit it's simple or do you mean for any number?
31st Jan 2018, 8:09 PM
Kuba H
Kuba H - avatar
+ 1
Single digit
10th Feb 2018, 10:12 AM
Lawrence Edaria
Lawrence Edaria - avatar
+ 1
than it could look like this: int digit = 1; switch(digit) { case 0 : printf("zero\n"); break; case 1 : printf("one\n"); break; and so on... I hope you get the idea. Good luck.
10th Feb 2018, 12:03 PM
Kuba H
Kuba H - avatar
+ 1
Thankyou
12th Feb 2018, 10:57 AM
Lawrence Edaria
Lawrence Edaria - avatar