Advertisement
PedroSG

Untitled

Apr 9th, 2015
236
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.34 KB | None | 0 0
  1. #include <stdio.h>
  2. int main()
  3. {
  4.     int n,m,i,j;
  5.     int X;
  6.     printf("Entre com o valor de N:");
  7.     scanf("%d",&n);
  8.     printf("Entre com o valor de M:");
  9.     scanf("%d",&m);
  10.     i = 1;
  11.     j = 1;
  12.     while (i!=n && j!=m)
  13.     {
  14.         i++;
  15.         j++;
  16.  
  17.     }
  18.  
  19.     X = (i+j)/(i+j);
  20.     printf("X = %d",X);
  21.     return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement