PPS Practical 14
- Aim: Write a C program to read no 1 to 7 and print relatively day Sunday to Saturday.
- Code:
//For turbo C++ remove below comments #include <stdio.h> //#include<conio.h> void main() { int d; // clrscr(); printf("Enter number from 1 to 7 : "); scanf("%d", &d); switch (d) { case 1: printf("Sunday"); break; case 2: printf("Monday"); break; case 3: printf("Tuesday"); break; case 4: printf("Wednesday"); break; case 5: printf("Thrusday"); break; case 6: printf("Friday"); break; case 7: printf("Saturday"); break; } // getch(); }
- Output:

Comments
Post a Comment