Advertisement
Avdluna

Untitled

Oct 12th, 2015
88
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.46 KB | None | 0 0
  1. #include <stdio.h>
  2. #include <stdlib.h>
  3.  
  4. int main()
  5. {
  6.     int a ,b , c, x;
  7.  
  8.     while(1){
  9.  
  10.     scanf("%d",&a);
  11.  
  12.  
  13.         if(a == 0){
  14.  
  15.             break;
  16.         }
  17.  
  18.         else{
  19.  
  20.            scanf("%d %d", &b, &c);
  21.            x = (a*b*c)/abs(a-c);
  22.  
  23.            if(x == 1){
  24.             printf("%d pagina\n",x);
  25.            }
  26.            else{
  27.             printf("%d paginas\n", x);
  28.            }
  29.         }
  30.  
  31.     }
  32.  
  33.     return 0;
  34. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement