The program 'C:\Documents and Settings\XXXXl\Desktop\assignments\Month&Day\Debug\month_day.exe' has exited with code 0 (0x0).
I commented out the request for "day"
Below is what I have so far. Any help is appreciated.
#include <stdio.h>
#include <conio.h>
int main()
{
char month;
printf("Enter Month:");
scanf("%c ",&month);
//printf("Enter Day:");
//scanf("%c ",&day);
switch (month)
{
case '1':
printf("\nMonth is January\n");
break;
case '2':
printf("\nMonth is February\n");
break;
case '3':
printf("\nMonth is March\n");
break;
case '4':
printf("\nMonth is April\n");
break;
case '5':
printf("\nMonth is May\n");
break;
case '6':
printf("\nMonth is June\n");
break;
case '7':
printf("\nMonth is July\n");
break;
case '8':
printf("\nMonth is August\n");
break;
case '9':
printf("\nMonth is September\n");
break;
case '10':
printf("\nMonth is October\n");
break;
case '11':
printf("\nMonth is November\n");
break;
case '12':
printf("\nMonth is December\n");
break;
default:
printf("\nIncorrect Data Entered!\n");
break;
}
getch ();
return 0;
}

New Topic/Question
Reply



MultiQuote





|