Last active
September 24, 2016 18:00
-
-
Save tuxcuiabano/49817df4ec3c5076104a3d4cf57d8e09 to your computer and use it in GitHub Desktop.
Função Máximo
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
#include <stdio.h> | |
int maximo (int x,int y, int z); | |
int main() | |
{ | |
// printf("Hello, World!\n"); | |
int num1,num2,num3; | |
printf("Digite 3 numeros\n"); | |
scanf("%d%d%d",&num1,&num2,&num3); | |
printf("O maior: %d\n",maximo(num1,num2,num3)); | |
return 0; | |
} | |
int maximo (int x,int y, int z){ | |
int max =x; | |
if(y>max){ | |
max=y; | |
} | |
if(z>max){ | |
max=z; | |
} | |
return max; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment