Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

Aim: Program to accept day number and print the day of the week using switch-case

Algorithm

Step 1: start the program


Step 2: read dayno as input
Step 3: switch the dayno and match with cases
Step 4: if dayno = 1 print “Sunday”
Step 5: if dayno = 2 print “Monday”
Step 6: if dayno = 3 print “Tuesday”
Step 7: if dayno = 4 print “Wednesday”
Step 8: if dayno = 5 print “Thursday”
Step 9: if dayno = 6 print “Friday”
Step 10: if dayno =7 print “Saturday”
Step 11: stop the program

You might also like