ShadmanTaqi

Switch Case Bigger

Mar 8th, 2021 (edited)
234
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  1. #include<stdio.h>
  2.  
  3. int main()
  4. {
  5.    int a;
  6.    int b;
  7.    int c;
  8.  
  9.    printf("Enter 2 digits: ");
  10.    scanf("%d %d", &a, &b);
  11.  
  12.     switch(a>b)
  13.     {
  14.  
  15.     case 1:
  16.         printf("A is greater");
  17.         break;
  18.  
  19.     case 0:
  20.         printf("B is greater");
  21.         break;
  22.     }
  23.  
  24.     return 0;
  25. }
  26.  
RAW Paste Data