samrina_sarkar_7

find largest numbers

Jun 19th, 2019
46
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.65 KB | None | 0 0
  1. #include<stdio.h>
  2. int main()
  3. {
  4.     int n;
  5.     printf("enter the number");
  6.     scanf("%d",&n);
  7.     if(n==1)
  8.     {
  9.         printf("the day is Sunday");
  10.     }
  11.     else if(n==2)
  12.     {
  13.         printf("the day is Monday");
  14.     }
  15.     else if(n==3)
  16.     {
  17.         printf("the day is Tuesday");
  18.     }
  19.     else if(n==4)
  20.     {
  21.         printf("the day is wednesday");
  22.     }
  23.     else if(n==5)
  24.     {
  25.         printf("the day is Thursday");
  26.     }
  27.     else if(n==6)
  28.     {
  29.         printf("the day is Friday");
  30.     }
  31.     else if(n==7)
  32.     {
  33.         printf("the day is Saturday");
  34.     }
  35.     else
  36.     {
  37.         printf("Invaild Input");
  38.     }
  39. }
Add Comment
Please, Sign In to add comment