Skip to content

Instantly share code, notes, and snippets.

@leostera
Created August 23, 2011 17:56
Show Gist options
  • Save leostera/1165997 to your computer and use it in GitHub Desktop.
Save leostera/1165997 to your computer and use it in GitHub Desktop.
Problema 20 versión de Franco, pero editada y compilable
/*
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