Skip to content

Instantly share code, notes, and snippets.

@FelipeGrijo
Created February 24, 2017 20:24
Show Gist options
  • Save FelipeGrijo/d6f39a71f96655327298e5b37a8d91dd to your computer and use it in GitHub Desktop.
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
//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