SHARE
TWEET

Week Number and Print The Day

tahsiniftekhar Jun 20th, 2019 64 Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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. }
RAW Paste Data
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand
Not a member of Pastebin yet?
Sign Up, it unlocks many cool features!
 
Top