Created
August 23, 2011 17:56
-
-
Save leostera/1165997 to your computer and use it in GitHub Desktop.
Problema 20 versión de Franco, pero editada y compilable
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
/* | |
franqo lizarraga | |
editado por el más genial del universo | |
*/ | |
#include <stdio.h> | |
int main (int a, char** b) | |
{ | |
int n=0; | |
int c=1; | |
int may=0; | |
int men=0; | |
int x=0; | |
printf("ingrse la cantidad de valores qe va a trabajar"); | |
scanf("%d",&n); | |
while ( c<=n ) | |
{ | |
printf("ingrese los valores"); | |
scanf("%d",&x); | |
if ( c == 1) | |
{ | |
may = x; | |
men = x; | |
} | |
else | |
{ | |
if ( x> may) | |
{ | |
may = x; | |
} | |
else | |
{ | |
if (x < men ) | |
men = x; | |
else | |
printf("be happy :D"); | |
} | |
} | |
c++; | |
} | |
getch(); | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment