Advertisement
tahsiniftekhar

Week Number and Print The Day

Jun 20th, 2019
182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.62 KB | None | 0 0
  1. #include<stdio.h>
  2.  
  3. main()
  4. {
  5.     int day;
  6.  
  7.     printf("Enter week number (1-7) :\n ");
  8.     scanf("%d", &day);
  9.  
  10.     if(day == 1){
  11.         printf("It's SaturDay!");
  12.     }else if(day == 2){
  13.         printf("It's SunDay!");
  14.     }else if(day == 3){
  15.         printf("It's MonDay!");
  16.     }else if(day == 4){
  17.         printf("It's TuesDay!");
  18.     }else if(day == 5){
  19.         printf("It's WednesDay!");
  20.     }else if(day == 6){
  21.         printf("It's ThursDay!");
  22.     }else if(day == 7){
  23.         printf("OMG! It's FridDay!");
  24.     }else{
  25.         printf("Please Enter week number between 1-7 !");
  26.     }
  27.  
  28.     return 0;
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement