Computer Science, asked by srijitapal, 1 year ago

Switch case program
1.Write a program to accept month number and display the name of the month
2.write a program to accept two numbers from users and display win,product ,difference,quotient and remainder as per the user's choice


ananya071: isr or not
ananya071: in Java or c + +
srijitapal: In java
ananya071: okk
srijitapal: Plz do it I need it asbent guys
srijitapal: *argent
ananya071: okkk

Answers

Answered by Sid2904
4
main()
{
int a;
clrscr();
printf("Enter number between 1 to 12");
scanf("%d",&a);
switch(a)
{
case 1:
printf("Jan");
break();
case 2:
printf("Feb");
break();
case 3:
printf("Mar");
break();
case 4:
printf("Apr");
break();
case 5:
printf("May");
break();
case 6:
printf("Jun");
break();
case 7:
printf("July");
break();
case 8:
printf("Aug");
break();
case 9:
printf("Sept");
break();
case 10:
printf("Oct");
break();
case 11:
printf("Nov");
break();
case 12:
printf("Dec");
break();
deafult:
printf("Enter valid number");
break();
}
getch():
}

Sid2904: this is 1st program
Similar questions