#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 ();
}
No hay comentarios:
Publicar un comentario