I need to have the out come of
Enter a digit between 0 and 9: 4
You entered the number four
So far I have come up with this
insert [/
Code:
*
File: wa2.c
Description: Written Assignment #2 for COS-116. Have the program print out the digit in words
Programmer: Thomas Garnick
Date: April 23rd 2008
*/
#include <stdio.h>
int main()
{
char one, two, three, four, five;
int number;
printf("Input Number: ");
scanf("%d",&number);
if (number == '1')
number = one;
if (number == '2')
number = two;
else if (number == '3')
number = three;
else if (number == '4')
number = four;
else if (number == '5')
number = five;
printf("you entered the number %c", number);
return 0;
}
]
When I enter a number it gives me a special character as my output. We are still in the basics and have not gotten into character strings. Any help would be greatly apritiated