Mayordecuatronumeros

Page 1

#include<stdio.h> #include<conio.h> #include<windows.h> main() { int a, b, c, d, aux1, aux2; clrscr(); printf("mayor de cuatro numeros\n"); printf("ingrese el valor de a\n"); scanf("%d",&a); printf("ingrese el valor de b\n"); scanf("%d",&b); printf("ingrese el valor de c\n"); scanf("%d",&c); printf("ingrese el valor de d\n"); scanf("%d",&d); if(a>b) { aux1=a; } else { aux1=b; } if(c>d) { aux2=c; } else { aux2=d; } if(aux1>aux2) { printf("el numero mayor es %d\n",aux1); } else { printf("el numero mayor es %d\n",aux2); } system("pause"); }


Turn static files into dynamic content formats.

Create a flipbook
Issuu converts static files into: digital portfolios, online yearbooks, online catalogs, digital photo albums and more. Sign up and create your flipbook.