#include <conio.h>
#include <stdio.h>
#include <iostream.h>
void main()
{
int v[10],n=1, f=6; float ma, me,
sum=0,prom;
gotoxy(19,2);cout<<"INSTITUTO
TECNOLOGICO SUPERIOR HUAQUILLAS";
gotoxy(32,3);cout<<"...LENIN
ZAPATA....";
gotoxy(23,4);cout<<"VECTOR_NUMERO
MAYOR_MENOR_PROMEDIO";
for(int i=0; i<=9;i++)
{
gotoxy(3,f);cout<<n<<".-
";
gotoxy(10,f);cin>>v[i];
sum = sum + v[i];f++;n++;
}
ma = v[0]; me = v[0];
prom = sum/10;
for(int i=1; i<=19;i++)
{
if(ma < v[i]){ma=v[i];}
if(me
> v[i]){me=v[i];}
}
gotoxy(17,7);cout<<" RESULTADOS
OBTENIDOS";
gotoxy(17,9);cout<<"El numero mayor
es: "<<ma;
gotoxy(17,10);cout<<"El numero
menor es: "<<me;
gotoxy(17,11);cout<<"El numero
promedio es: "<<prom;
getch();
No hay comentarios:
Publicar un comentario