Advertisement
Nurbo

Maior10Pares

Aug 16th, 2017
63
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.45 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5.     int x, y, z, maior;
  6.     printf("Digite o primeiro valor > ");
  7.     scanf("%d",&x);
  8.     printf("Digite o segundo valor > ");
  9.     scanf("%d",&y);
  10.     printf("Digite o terceiro valor > ");
  11.     scanf("%d",&z);
  12.     if(x > y && x > z)
  13.         maior = x;
  14.     else if(y > x && y > z)
  15.         maior = y;
  16.     else if(z > x && z > y)
  17.         maior = z;
  18.     printf("O maior numero e %d\n",maior);
  19.     for(int i = 2; i <= 20; i = i+2)
  20.         printf("%d ",i);
  21.     return 3928;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement