Drowze

03 Comando Condicional de Selecao 03

Mar 29th, 2014
74
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.37 KB | None | 0 0
  1. /* Fazer um programa que receba dois números e imprima na tela apenas os maiores que 10. */
  2. #include <stdio.h>
  3. #include <stdlib.h>
  4.  
  5. void main()
  6. {
  7.     int a,b;
  8.  
  9.     printf("Digite dois numeros e exibirei os numeros maiores que 10: ");
  10.     scanf("%d %d", &a,&b);
  11.  
  12.     printf("Os maiores que 10 sao: ");
  13.     if(a>10) printf("%d ",a);
  14.     if(b>10) printf("%d\n",b);
  15.  
  16.     system("pause");
  17. }
Advertisement
Add Comment
Please, Sign In to add comment