Advertisement
Guest User

lampadashotel.c

a guest
Feb 20th, 2018
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.35 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main(){
  4.  
  5.     int ia, ib, fa, fb;
  6.     scanf("%d %d %d %d\n",&ia,&ib,&fa,&fb);
  7.    
  8.     int nclicks = 0;
  9.  
  10.     if ( ia == fa ) {
  11.         if ( ib == fb ) {
  12.             nclicks = 0;
  13.         }
  14.         else {
  15.             nclicks = 2;
  16.         }
  17.     } else {
  18.         if ( ib == fb ) {
  19.             nclicks = 1;
  20.         }
  21.         else {
  22.             nclicks = 1;
  23.         }
  24.     }
  25.  
  26.     println("%d\n",nclicks);
  27.  
  28.     return 0;
  29.  
  30. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement