jueves, 21 de julio de 2016

FUNCIÓN NUMEROS PRIMOS

#include <conio.h>
#include <iostream.h>
#include <stdio.h>
#include <math.h>
int funcion_pri( int v1[])
{
int p=0;
 for( int x=0; x<10; x++)
 {   if(v1[x]%2==0)
       {
       p=p+1;
       }
 }
return p;
}
int main()
{
 int v1[10],f=9;
 gotoxy(19,3);cout<<"INSTITUTO TECNOLOGICO SUPERIOR HUAQUILLAS";
gotoxy(32,4);cout<<"...LENIN ZAPATA....";
gotoxy(30,6);cout<<"FUNCION NUMEROS PRIMOS";
gotoxy(10,7);cout<<"INBRESE 10 NUMEROS";
 for( int x=0; x<10; x++)
 {
 gotoxy(15,f);cout<<x+1<<": ";cin>> v1[x];

 f++;
  }
   gotoxy(30,10);cout<<"NUMEROS PRIMOS IMGRESADOS: "<<funcion_pri(v1);
  getch();
  }

FUNCIÓN QUE PERMITE DETERMINAR CUANTOS MENORES, MAYORES Y ADULTOS HAY

#include <iostream.h>
#include <conio.h>
#include <stdio.h>
#include <stdlib.h>
#include <math.h>
int fun_Adultos(int ed[])
{int suma=0;
  for(int x=0;x<5; x++)
   {
    if(ed[x] > 64)
    {suma =suma +1;}}
   return suma;
}
int fun_mayor(int ed[])
{int sun=0;
 for(int h=0;h<5; h++)
   {if((ed[h] >17)&&(ed[h] <65))
    { sun=sun+1;}
   }return sun;
}
int fun_menores(int ed[])
{int sum=0;
  for(int j=0;j<5; j++)
   {if(ed[j] < 18)
   {sum=sum+1;}}
   return sum;
}
int main()
{ int ed[5],f=10;
gotoxy(19,3);cout<<"INSTITUTO TECNOLOGICO SUPERIOR HUAQUILLAS";
gotoxy(32,4);cout<<"...LENIN ZAPATA....";
gotoxy(6,6);cout<<"FUNCION QUE PERMITE DETERMINAR CUANTOS MENORES, MAYORES Y ADULTOS HAY ";
  gotoxy(5,8);cout<<"\n INGRESE 5 EDADES:  ";
   for(int i=0;i<5; i++)
   {  gotoxy(5,f);cin>>ed[i];f++;}
  cout<<"\n\n ADULTOS    " << fun_Adultos(ed);
  cout<<"\n\n MAYORES    " << fun_mayor(ed);
  cout<<"\n\n MENORES    " << fun_menores(ed);
  getch();
}

miércoles, 20 de julio de 2016

CLEAR UN VECTOR DE 10 ELEMENTOS, PRESENTE UN SEGUNDO VECTOR QUE CONTENGA EL RESULTADO AL CUADRADO DEL PRIMER VECTOR Y PRESENTE EN UN TERSER VECTOR EL RESULTADO AL CUADRADO DEL SEGUNDO VECTOR.

#include <conio.h>
#include <stdio.h>
#include <iostream.h>
//CLEAR UN VECTOR DE 10 ELEMENTOS, PRESENTE UN SEGUNDO VECTOR QUE CONTENGA EL
//RESULTADO AL CUADRADO DEL PRIMER VECTOR Y PRESENTE EN UN TERSER VECTOR EL
//RESULTADO AL CUADRADO DEL SEGUNDO VECTOR.
void main()
{
int v1[10],v2[10],v3[10],f=10,ff=10,ii=1;
gotoxy(5,2); cout<<"INSTITUTO TECNOLOGICO SUPERIOR HUAQUILLAS";
gotoxy(5,3); cout<<"ESTUDIANTE: RUSBERTH LENIN ZAPATA MORALES";
gotoxy(35,5); cout<<"30-JUN-2016";
gotoxy(5,8); cout<<" LLENE EL VECTOR #1";
gotoxy(30,8); cout<<" VECTOR #2";
gotoxy(51,8); cout<<" VECTOR #3";
 for(int i=0;i<=9; i++)
 {
   gotoxy(5,f); cout<<ii<<".-";ii++;
   gotoxy(13,f); cin>>v1[i];
   v2[i]=v1[i]*v1[i];
   v3[i]=v2[i]*v2[i];
   f++;
 }
 for(int i=0;i<=9; i++)
 {
  gotoxy(20,ff);cout<<"------>";
  gotoxy(43,ff);cout<<"------>";
  gotoxy(35,ff);cout<<v2[i];
  gotoxy(55,ff);cout<<v3[i];
  ff++;
 }
 getch ();

}

SUMA DE DOS VECTORES.

#include <iostream.h>
#include <conio.h>
#include <stdlib.h>
#include <stdio.h>
int main()
{float vector1[4],vector2[4], vector3[4];
int i;
gotoxy(19,3);cout<<"INSTITUTO TECNOLOGICO SUPERIOR HUAQUILLAS";
gotoxy(32,4);cout<<"...LENIN ZAPATA....";
gotoxy(27,5);cout<<" SUMA DE DOS VECTORES";
cout << "\n\t INGRESE 4 NUMEROS:  \n";
for ( i=0; i<4; i++)
{
cout << "\t";cin >> vector1[i];
}
cout << "\n\tINGRESE 4 NUMEROS MAS: \n";
for ( i=0; i<4; i++)
{
cout << "\t";cin >> vector2[i];
vector3[i]= vector1[i] + vector2[i];
}
cout << "\n\tLa suma de los dos vectores es: \n";
for (i=0; i<4; i++)
{cout<< "\t"<< vector3[i] << "\n ";
    }
    getch ();
}

FUNCION PARA CALCULAR EL CUBO DE UN NUMERO REAL

# include <iostream.h>
# include <math.h>
# include <conio.h>
# include <stdio.h>
//funcion para calcular el cubo de un numero real
float cubo(float a)
{
float b;
b=pow(a,3);
return b;
}

int main()
{
gotoxy(19,3);cout<<"INSTITUTO TECNOLOGICO SUPERIOR HUAQUILLAS";
gotoxy(32,4);cout<<"...LENIN ZAPATA....";
gotoxy(17,5);cout<<"FUNCION PARA CALCULAR EL CUBO DE UN NUMERO REAL";
float a;
gotoxy(15,8);cout<<"ingrese un numero:";cin>>a;
gotoxy(15,10);cout<<"el cubo del numero ingresado es:"<<cubo(a);
getch();
}

CREAR 2 VECTORES (V) DE 3 ELEMENTOS Y UN TERCER VECTOR QUE CONTENGA EL RESULTADO DE V"B" ELEVADO AL CUBO + V"A" FACTORIAL – 2

#include <conio.h>
#include <stdio.h>
#include <iostream.h>
void main()
{
int v1[3],v2[3],v3[3],r=1,n,num,f=10,fff=25,ff=16, ii=1, iii=1;
gotoxy(14,3);cout<<"INSTITUTO TECNOLOGICO SUPERIOR HUAQUILLAS";
gotoxy(28,4);cout<<"...LENIN ZAPATA....";
gotoxy(31,5); cout<<"30-JUN-2016";
gotoxy(5,8); cout<<" Ingrese 3 numeros:";
gotoxy(48,8); cout<<"Factorial:";
 for(int i=0;i<=2; i++)
 {
  gotoxy(5,f);cout<<ii<<".-";
  gotoxy(13,f);cin>>num;
                for(n=1;n<=num;n++)
   { r=r*n; }
  v1[i]=r;
  gotoxy(32,f);cout<<"------>";
  gotoxy(51,f);cout<<v1[i];
   r=1;f++;ii++;
 }
 gotoxy(5,14); cout<<" Ingrese 3 numeros mas:";
 gotoxy(46,14); cout<<"Elevado al cubo:";
 for(int i=0;i<=2; i++)
 {
   gotoxy(5,ff); cout<<iii<<".-";iii++;
   gotoxy(13,ff); cin>>n;
   v2[i]= n*n*n;
   gotoxy(32,ff);cout<<"------>";
  gotoxy(51,ff);cout<<v2[i];
   ff++;
 }
 gotoxy(27,20); cout<<"TABLA DE RESULTADOS.";
 gotoxy(10,22); cout<<"VECTOR#1";gotoxy(10,23); cout<<"Factorial";
 gotoxy(32,22); cout<<"VECTOR#2";gotoxy(29,23); cout<<"Elevado al cubo";
 gotoxy(53,22); cout<<"VECTOR#3";gotoxy(50,23); cout<<"Fac + cub - 2 =";
 for(int i=0;i<=2; i++)
 {
 v3[i]= v1[i]+v2[i]-2;
 gotoxy(13,fff);cout<<v1[i];
 gotoxy(36,fff);cout<<v2[i];
 gotoxy(56,fff);cout<<v3[i];
 fff++;
 }
 getch ();
}


VECTOR QUE DETERMINA SI UN NUMEROS ES PRIMOS

#include <conio.h>
#include <stdio.h>
#include <iostream.h>
void main()
{
int v[10],a=0, cp=0, f=8;
gotoxy(19,3);cout<<"INSTITUTO TECNOLOGICO SUPERIOR HUAQUILLAS";
gotoxy(32,4);cout<<"...LENIN ZAPATA....";
gotoxy(17,5);cout<<"VECTOR QUE DETERMINA SI UN NUMEROS ES PRIMOS";
gotoxy(5,7);cout<<"Llene el vector";
 for(int i=0; i<=9; i++)
 {
  gotoxy(5,f);cin>> v[i];
  for(int e=1; e<= v[i]; e++)
  {
if(v[i] % e == 0)
   {
   a = a+1;
   }
  }
   if(a == 2)
   {
   cp++;
   gotoxy(7,f);cout<<" <-- numero primo \n";
   }
   f++; a=0;
 }
 f++; gotoxy(6,f);cout<<" Usted ha ingresado "<<cp<<" numeros primos!!.";
  getch();
}

FACTORIAL DE CINCO NUMEROS UTILIZANDO DOS VECTORES.

#include <conio.h>
#include <stdio.h>
#include <iostream.h>
//CLEAR UN VECTOR DE 4 ELEMENTOS, PRESENTE UN SEGUNDO VECTOR QUE CONTENGA EL
//RESULTADO FACTORIAL DEL PRIMER VECTOR
void main()
{
int v1[4],v2[4],r=1,n,f=9,ff=9, ii=1;
gotoxy(19,2);cout<<"INSTITUTO TECNOLOGICO SUPERIOR HUAQUILLAS";
gotoxy(32,3);cout<<"...LENIN ZAPATA....";
gotoxy(13,4);cout<<"FACTORIAL DE CINCO NUMEROS UTILIZANDO DOS VECTORES.";
gotoxy(5,7); cout<<" LLENE EL VECTOR";
 for(int i=0;i<=3; i++)
 {
  gotoxy(5,f);cout<<ii<<".-";
  gotoxy(13,f);cin>>v1[i];
                for(n=1;n<=v1[i];n++)
   { r=r*n; }
  v2[i]=r; r=1;f++;ii++;
 }
 gotoxy(30,7); cout<<"V_FACTORIAL";
 for(int i=0;i<=3;i++)
 { gotoxy(22,ff);cout<<"----->";
                gotoxy(35,ff); cout<<v2[i];ff++; }
 getch();

}


VECTOR_NUMERO MAYOR_MENOR_PROMEDIO

#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();

DETERMINA DE TRES VECTORES EL MAYOR

#include <iostream>
#include <conio>
int main()
{float vector1[5],mayor=0,vector3[5],vector2[5] ;
    int i, f=8,mayor1=0 , mayor2=0;
gotoxy(19,2);cout<<"INSTITUTO TECNOLOGICO SUPERIOR HUAQUILLAS";
gotoxy(32,3);cout<<"...LENIN ZAPATA....";
gotoxy(23,4);cout<<"DETERMINA DE TRES VECTORES EL MAYOR";
    gotoxy(10,6),cout << "PRIMER VECTOR :  ";
    for ( i=0; i<5; i++)
    {            gotoxy(10,f),cin >> vector1[i];
        f++;
        if(vector1[i] > mayor )
        {mayor = vector1[i];     }}
    f=8;
    gotoxy(30,6),cout << "SEGUNDO VECTOR ";
      for ( i=0; i<5; i++)
    {   gotoxy(30,f),cin >> vector2[i];
        f++;
        if(vector2[i] > mayor1)
        {mayor1 = vector2[i]; }}
    f=8;
    gotoxy(50,6),cout << "TERSER VECTOR ";
      for ( i=0; i<5; i++)
    {   gotoxy(50,f),cin >> vector3[i];
        f++;
        if(vector3[i] > mayor2 )
        {mayor2 = vector3[i]; }}
    gotoxy(10,15);cout << "DEL VECTOR 1 EL MAYOR ES : " << mayor << "\n ";
    gotoxy(10,17);cout << "DEL VECTOR 2 EL MAYOR ES : " << mayor1<< "\n ";
    gotoxy(10,19);cout << "DEL VECTOR 3 EL MAYOR ES : " << mayor2 << "\n ";
    getch ();

    }

VECTOR, MAYOR DE 5 NUMEROS

#include <iostream>
#include <conio>
int main()
{
    float vector1[5];
    int  mayor = 0, f = 8;
gotoxy(19,3);cout<<"INSTITUTO TECNOLOGICO SUPERIOR HUAQUILLAS";
gotoxy(32,4);cout<<"...LENIN ZAPATA....";
gotoxy(27,5);cout<<"VECTOR, MAYOR DE 5 NUMEROS";
   gotoxy(10,7);cout << " Llene el vector :  ";
    for ( int i=0; i<5; i++)
    {gotoxy(10,f);cin >> vector1[i];
      f++;
     }mayor = vector1[0];
     for ( int i=0; i<5; i++)
     {
        if(vector1[i] > mayor )
        {mayor = vector1[i]; }
     }
gotoxy(10,15);cout << "EL MAYOR DE LOS VECTORES  ES: " << mayor ;
getch ();
}


SUMA, RESTA, MULTIPLICACION y DIVICION DE DOS NUMEROS.

#include<stdio.h>
#include<conio.h>
#include<iostream.h>
void main ()
{ int n1 = 0 , n2 = 0;
gotoxy(19,2);cout<<"INSTITUTO TECNOLOGICO SUPERIOR HUAQUILLAS";
gotoxy(32,3);cout<<"...LENIN ZAPATA....";
gotoxy(10,4);cout<<"SUMA, RESTA, MULTIPLICACION y DIVICION DE DOS NUMEROS.";
 gotoxy(2,6);cout<<"Ingrese primer numero :  " ;
 cin>>  n1 ;
 gotoxy(2,7);cout<<"Ingrese segundo numero:  " ;
 cin >> n2 ;
 gotoxy(10,9);cout<<" SUMA  " << n1 <<" + " << n2 << " = " << (n1 + n2 )  ;
 gotoxy(10,10);cout<<" RESTA   " << n1 <<" - " << n2 <<" = " <<  (n1 - n2 );
 gotoxy(10,11);cout<<" MULTIPLICAION " << n1 <<" * " << n2 <<" = " << (n1 * n2);
 gotoxy(10,12);cout<<" DIVICION  " << n1 <<" / " << n2 <<" = " <<( n1 / n2 );
 _getch();
 }

DETERMINAR DE TRES NUMEROS EL MAYOR Y MENOR.

#include <stdio.h>
#include <conio.h>
#include <iostream.h>
void main()
{
 int n1, n2 ,n3;
gotoxy(23,17);cout<<"****************************";
for(int i=18;i<=20;i++)
{gotoxy(23,i);cout<<"*"; gotoxy(50,i);cout<<"*";}
gotoxy(23,20);cout<<"****************************";
gotoxy(10,1);cout<<"******************************************************************";
gotoxy(10,5);cout<<"******************************************************************";
for(int i=2;i<=4;i++)
{gotoxy(10,i);cout<<"*"; gotoxy(75,i);cout<<"*";}
gotoxy(12,2);cout<<"DETERMINE CUAL DE LOS TRES NUMEROS INGRESADOS ES MAYOR Y MENOR ";
gotoxy(32,3);cout<<"...LENIN ZAPATA....";
gotoxy(13,10);cout<<"> Ingrese primer numero : "; cin>> n1;
gotoxy(13,11);cout<<"> Ingrese segundo numero: "; cin>> n2;
gotoxy(13,12);cout<<"> Ingrese tercer numero:  "; cin>> n3;
 if((n1 > n2) && (n1 > n3))
  { gotoxy(25,18);cout<<"El numero mayor es: " << n1; }
   else
   {
   if((n2 > n1 )&& (n2 > n3))
   {gotoxy(25,18);cout<<"El numero mayor es: " << n2;}
   else
   {gotoxy(25,18);cout<<"El numero mayor es: " << n3; }
  }
  if((n1 < n2 ) && (n1 < n3))
  {gotoxy(25,19);cout<<"El numero menor es: " << n1;}
      else
      {
      if((n2 < n1 ) && (n2 < n3))
      {gotoxy(25,19);cout<<"El numero menor es: " << n2; }
       else
       {gotoxy(25,19);cout<<"El numero menor es: " << n3;}
     }
_getch();

}

FUNCION GOTOXY; MAYOR DE DOS NUMEROS

#include <stdio.h>
#include <conio.h>
#include <iostream.h>
void main()
{
 int n1 = 0, n2= 0 ;

gotoxy(12,1);cout<<"************************************************************";
gotoxy(12,5);cout<<"************************************************************";
for(int i=2;i<=4;i++)
{gotoxy(12,i);cout<<"*";  gotoxy(71,i);cout<<"*";}
gotoxy(12,14);cout<<"***************************";
gotoxy(12,16);cout<<"***************************";
for(int i=14;i<=16;i++)
{gotoxy(12,i);cout<<"*";  gotoxy(39,i);cout<<"*";}
gotoxy(14,2);cout<<"DETERMINE CUAL DE LOS DOS NUMEROS INGRESADOS ES EL MAYOR ";
gotoxy(32,3);cout<<"...LENIN ZAPATA....";
gotoxy(12,10);cout<<"> Digite primer numero : "; cin>> n1;
gotoxy(12,11);cout<<"> Digite segundo numero: "; cin>> n2;
 if(n1 > n2 )
  {gotoxy(13,15);cout<<"El numero mayor es: " << n1; }
   else
   {gotoxy(15,15);cout<<"El numero mayor es: " << n2;}
  _getch();

}

SUMA DE TRES NUMEROS.

void main ()
{
int num, suma = 0;
gotoxy(19,3);cout<<"INSTITUTO TECNOLOGICO SUPERIOR HUAQUILLAS";
gotoxy(31,4);cout<<"...LENIN ZAPATA....";
gotoxy(30,6);cout<<"SUMA DE TRES MUMEROS.";
gotoxy(15,8);cout<<"INGRESE 3 NUMEROS:";
for(int i = 1 ; i<=3  ; i++)
 {                             
  gotoxy(15,10+i);cout<<"Numero " << i<<": ";cin>> num;
  suma = suma + num;
 }
 gotoxy(16,15);cout<<" La suma es: " << suma;
 getch();
 }










SICLO MIENTRAS; NUMEROS DIFERENTE DE CERO, PRECENTAR EL MAYOR.

#include <stdio.h>
#include <conio.h>
#include <iostream.h>
#include <math.h>
void main ()
{
int h = 0, ma = 0, i=1, ii=8 ;
gotoxy(19,3);cout<<"INSTITUTO TECNOLOGICO SUPERIOR HUAQUILLAS";
gotoxy(32,4);cout<<"...LENIN ZAPATA....";
gotoxy(10,6);cout<<"SICLO MIENTRAS; NUMEROS DIFERENTE DE CERO, PRECENTAR EL MAYOR";
do
 {gotoxy(10,ii);cout<<"NUMERO "<<i<<":  ";cin>> h;i++;ii++;
 if( h > ma)
  {ma = h;} }
 while(h != 0);
 gotoxy(10,ii+2);cout<<"El numero mayor es : " << ma;
 getch();

}

DETERMINA NUMERO PRIMO

#include <conio.h>
#include <stdio.h>
#include <iostream.h>
void main()
{
int a=0, n=0;
gotoxy(19,3);cout<<"INSTITUTO TECNOLOGICO SUPERIOR HUAQUILLAS";
gotoxy(32,4);cout<<"...LENIN ZAPATA....";
gotoxy(35,6);cout<<"NUMERO PRIMO";
gotoxy(13,8);cout<<"Ingrese un numero: ";cin >> n;
 for(int i=1; i<=n; i++)
 {
                if(n % i == 0)
   {
   a = a+1;
   }
 }
   if(a != 2)
   {
   gotoxy(45,9);cout<<"\1 "<<n<<" no es primo";
   }
   else
   {
   gotoxy(45,9);cout<<"\1 "<<n<<" si es primo";
   }
 getch();

}


MULTIPLO DE 4 5 Y 6.

void main ()
{int num ;
gotoxy(19,3);cout<<"INSTITUTO TECNOLOGICO SUPERIOR HUAQUILLAS";
gotoxy(30,4);cout<<"...LENIN ZAPATA...";
gotoxy(17,5);cout<<"CALCULA SI EL NUMERO ES MULTIPLO DE 5, 4 Y 6";

for(int i = 1 ; i<= 10 ; i++)
 {
  gotoxy(15,9);cout<<" Numero "<<i<<" : " ;cin>> num;
  if(num % 5 == 0)
  {gotoxy(30,10);cout<< num <<" es multiplo de cinco";}
  else
  {gotoxy(30,10);cout<< num <<" No es multiplo de cinco ";}
  if(num % 4 == 0)
  {gotoxy(30,11);cout<< num << " es multiplo de cuatro";}
  else
  {gotoxy(30,11);cout<< num << " No es multiplo de cuatro ";}
  if(num % 6 == 0)
  {gotoxy(30,12);cout<< num << " es multiplo de seis";}
  else
  {gotoxy(30,12);cout<< num << " No es multiplo de seis ";}
  }
  getch();

  }

IF ANIDADOS EL MAYOR DE 5 NUMEROS.

#include <stdio.h>
#include <conio.h>
#include <iostream.h>
 void main()
{
 int  n1 , n2 , n3 ,n4 ,n5 ;

gotoxy(19,3);cout<<"INSTITUTO TECNOLOGICO SUPERIOR HUAQUILLAS";
gotoxy(30,4);cout<<"...LENIN ZAPATA...";
gotoxy(18,5);cout<<"IMPRIME EL NUMERO MAYOR";

gotoxy(6,7);cout<<"\1 INGRESE 5 NUMEROS: ";
gotoxy(5,9);cin>>   n1;
 gotoxy(5,10);cin>>  n2;
 gotoxy(5,11);cin>>  n3;
 gotoxy(5,12);cin>>  n4;
 gotoxy(5,13);cin>>  n5;

 if(n1 >n2 )
 {
if(n1 > n3)
{if(n1 > n4)
{
if(n1 > n5)
{gotoxy(24,20),cout<<"El numero mayor es: " << n1 ;}
else
{gotoxy(35,12);cout<<"El mayor es: " << n5;}
}
else
{ if(n4 > n5)
{gotoxy(35,12);cout<<"el mayor es : " << n4;}
else
{gotoxy(35,12);cout<<"el mayor es : " << n5;}
}
}else
{
if( n3 > n4 )
{
if (n3 > n5)
{gotoxy(35,12);cout<<"el mayor es : " << n3;}
else
{gotoxy(35,12);cout<<" el mayor es: " << n5;}
}
else
{
if(n4 > n5)
{gotoxy(35,12);cout<<" el mayor es:" << n4;}
else
{gotoxy(35,12);cout<<"el mayor es:" << n5;
}
}
}
}
else
if(n2 > n3)
{
if(n2 > n4)
{
if(n2 > n5)
{gotoxy(35,12);cout<<" el mayor es:" << n2;}
                                                  else
{gotoxy(35,12);cout<<" el mayor es: " <<n5; }
}
else
{
if( n4 > n5)
{gotoxy(35,12);cout<<"el mayor es :" << n4; }
else
{gotoxy(35,12);cout<<" el mayor es: " << n5 ; }
}
} else
{
if(n3 > n4)
{
if(n3 > n5)
{ gotoxy(35,12);cout<<"el mayor es : " << n3; }
else
{gotoxy(35,12);cout<<"el mayor es: " << n5; }
}else
if(n4 > n5)
{gotoxy(35,12);cout<< "mayor es : " << n4;     }
else
{gotoxy(35,12);cout<<" mayor es : " << n5 ; }
}
}
}
 gotoxy(35,10);cout<<"RESULTADO:";
 getch();
}

MAYOR DE 5 NUMEROS

#include <stdio.h>
#include <conio.h>
#include <iostream.h>
#include <math.h>
void main ()
{
int num ,mayor = 0 , f=10 ;
gotoxy(19,3);cout<<"INSTITUTO TECNOLOGICO SUPERIOR HUAQUILLAS";
gotoxy(30,4);cout<<"...LENIN ZAPATA...";
gotoxy(18,5);cout<<"IMPRIME EL NUMERO MAYOR";
gotoxy(5,8);cout<<"INGRESE 5 NUMEROS: ";
 for(int i = 1 ; i<= 5 ; i++)
 {
  gotoxy(3,f);cout<<"NUMERO "<< i<<": ";cin>> num;
   if(num > mayor)
  mayor = num;
  f++;
 }
 gotoxy(35,10);cout<<"RESULTADO:";
 gotoxy(35,12);cout<<"\1 El numero mayor es: " << mayor;
 getch();

}

PRESENTACION DE UN TRIANGULO.

#include <stdio.h>
#include <conio.h>
#include <iostream.h>
void main ()
{
int  F=10, C= 40 , CO=40 , FI= 18;
gotoxy(19,3);cout<<"INSTITUTO TECNOLOGICO SUPERIOR HUAQUILLAS";
gotoxy(32,4);cout<<"...LENIN ZAPATA....";
gotoxy(27,6);cout<<"PRESENTACION DE UN TRIANGULO";
 for(int i= 1; i<=9 ; i++)
 {gotoxy(C,F);cout<<"*";
  gotoxy(CO,F);cout<<"*";
  F++;C--;CO++;}
 for(int CC= 32; CC<=49; CC=CC+2)
 {gotoxy(CC,FI);cout<<"*";}
 getch();

}

PRESENTACION DE UN TRIANGULO.

#include <stdio.h>
#include <conio.h>
#include <iostream.h>
void main ()
{int  F=10, C= 13 , CO= 63 , FI= 10;
gotoxy(19,3);cout<<"INSTITUTO TECNOLOGICO SUPERIOR HUAQUILLAS";
gotoxy(32,4);cout<<"...LENIN ZAPATA....";
gotoxy(27,6);cout<<"PRESENTACION DE UN RECTANGULO";
 for(int i= 1; i<=9 ; i++)
 {gotoxy(C,F);cout<<"*";
  gotoxy(CO,F);cout<<"*";
  F++;}
 for(int CC= 13; CC<= 63; CC=CC+2)
 {gotoxy(CC,F);cout<<"*";
  gotoxy(CC,FI);cout<<"*";}
 getch();

 }

PRESENTACION DE UN CUADRADO

#include <stdio.h>
#include <conio.h>
#include <iostream.h>
void main ()
{
int  F=10, C= 30 , CO= 50 , FI= 10;
gotoxy(19,3);cout<<"INSTITUTO TECNOLOGICO SUPERIOR HUAQUILLAS";
gotoxy(32,4);cout<<"...LENIN ZAPATA....";
gotoxy(27,6);cout<<"PRESENTACION DE UN CUADRADO";
 for(int i= 1; i<=9 ; i++)
 {
  gotoxy(C,F);cout<<"*";
  gotoxy(CO,F);cout<<"*";
  F++;
 }
 for(int CC= 30; CC<= 50; CC=CC+2)
 {
  gotoxy(CC,F);cout<<"*";
  gotoxy(CC,FI);cout<<"*";
 }
 getch();

}

MAYORES MENORES Y MULTIPLO DE CINCO

#include <conio.h>
#include <iostream.h>
#include <math.h>
void main ()
{
int num ,mayor = 0 , menor = 1000 , multi = 0, f=10 ;
gotoxy(19,3);cout<<"INSTITUTO TECNOLOGICO SUPERIOR HUAQUILLAS";
gotoxy(30,4);cout<<"...LENIN ZAPATA...";
gotoxy(18,5);cout<<"IMPRIME EL NUMERO MAYOR, MENOR Y MULTIPLOS DE 5";
gotoxy(5,8);cout<<"INGRESE 10 NUMEROS: ";
 for(int i = 1 ; i<= 10 ; i++)
 {
  gotoxy(3,f);cout<<"NUMERO "<< i<<": ";cin>> num;
  if(num % 5 == 0)
  {multi = multi + 1;
  gotoxy(15,f);cout<<" <= Multiplo.";}
  if(num > mayor)
  mayor = num;
  if(num < menor)
  menor = num;
  f++;
 }
 gotoxy(35,10);cout<<"RESULTADOS:";
 gotoxy(35,12);cout<<"\1 El numero mayor es: " << mayor;
 gotoxy(35,13);cout<<"\2 El numero menor es: " << menor;
 gotoxy(35,14);cout<<"\3 Multiplos ingresados: " << multi;
 getch();

}