Created
September 13, 2018 03:56
-
-
Save DRMD431LU/9b5a2bdf6acd58f8683efff3b9dd4175 to your computer and use it in GitHub Desktop.
comparar 3 numeros
This file contains hidden or 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 main(){ | |
| Int A,B,C=0; | |
| Int Mayor=0; | |
| //Int B=0; | |
| printf("Ingrese el valor de la variable A: \n") | |
| scanf(&A); | |
| getchar(); | |
| printf("Ingrese el valor de la variable B: \n") | |
| scanf(&B); | |
| getchar(); | |
| printf("Ingrese el valor de la variable C: \n") | |
| scanf(&C); | |
| getchar(); | |
| if(A>B){ | |
| Mayor=A; | |
| } | |
| else{ | |
| Mayor=B; | |
| } | |
| if(Mayor>C){ | |
| Mayor=Mayor; | |
| } | |
| else{ | |
| Mayor=C; | |
| } | |
| printf("El valor mas grande es: %d " , Mayor); | |
| Return 0; | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment