Created
February 24, 2017 20:24
-
-
Save FelipeGrijo/d6f39a71f96655327298e5b37a8d91dd to your computer and use it in GitHub Desktop.
7) Construa um algoritmo que receba três números inteiros e verifique qual o maior
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//https://gist.github.com/FelipeGrijo | |
#include <stdio.h> | |
int main() | |
{ | |
int Num1,Num2,Num3=0; | |
printf("Exercicio 7\nDigite 3 numeros.\nPrimeiro numero:"); | |
scanf("%d",&Num1); | |
printf("Segundo numero:"); | |
scanf("%d",&Num2); | |
printf("Terceiro numero:"); | |
scanf("%d",&Num3); | |
if(Num1 > Num2 && Num1 > Num3){ | |
printf("%d e o maior numero.\n",Num1); | |
} | |
else if(Num2 > Num3){ | |
printf("%d e o maior numero.\n",Num2); | |
} | |
else | |
{ | |
printf("%d e o maior numero.\n",Num3); | |
} | |
system("pause"); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment