Ver Mensaje Individual
  #2 (permalink)  
Antiguo 18/04/2010, 13:04
Byzs
 
Fecha de Ingreso: abril-2010
Mensajes: 10
Antigüedad: 14 años, 10 meses
Puntos: 0
Respuesta: usar la sentencia if

Buenas alejin1290....podrías hacer algo así


Código:
#include <stdio.h>

int main(int argc,char*argv[]){

	int num1,num2,num3,num4;
	
	printf("ingrese el primer numero:");
	scanf("%d",&num1);
	printf("\ningrese el segundo numero:");
	scanf("%d",&num2);
	printf("\ningrese el tercer numero:");
	scanf("%d",&num3);
	printf("\ningrese el cuarto numero:");
	scanf("%d",&num4);
	
	if(num1 == num2 && num1 == num3 && num1 == num4){
		printf("Son todos iguales");
		return 0;
		}
	if(num1>=num2 && num1>=num3 && num1>=num4){
		printf("el numero mas grande es:%d",num1);
		return 0;
	}
	if(num2>=num1 && num2>=num3 && num2>=num4){
		printf("el numero mas grande es:%d",num2);
		return 0;
	}
	if(num3>=num1 && num3>=num2 && num3>=num4){
		printf("el numero mas grande es:%d",num3);
		return 0;
	}if(num4>=num1 && num4>=num2 && num4>=num3){
		printf("el numero mas grande es:%d",num4);
		return 0;
	}
return 1;
}
espero que se entienda...saludos !