Skip to content

Instantly share code, notes, and snippets.

@DRMD431LU
Created September 13, 2018 03:56
Show Gist options
  • Save DRMD431LU/9b5a2bdf6acd58f8683efff3b9dd4175 to your computer and use it in GitHub Desktop.
Save DRMD431LU/9b5a2bdf6acd58f8683efff3b9dd4175 to your computer and use it in GitHub Desktop.
comparar 3 numeros
#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