Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- #include <stdlib.h>
- int main(int argc, char *argv[])
- {
- int cont, a, maior1, maior2;
- cont=1;
- maior1=a;
- maior2=a;
- while (cont<=10) {
- printf("Digite o numero %d:", cont);
- scanf("%d", &a);
- cont++;
- if(a>maior1) {
- maior1=a;
- }
- if (maior2>maior1) {
- maior1=maior2;
- }
- }
- printf("O primeiro maior e: %d e o segundo maior e: %d\n", maior1, maior2);
- system("PAUSE");
- return 0;
- }
Add Comment
Please, Sign In to add comment