sábado, 24 de noviembre de 2012

PROGRAMA PARA CALCULAR EL PRODUCTO DE LOS NUMEROS ENTEROS DEL 1 AL 10

 PROGRAMA  PARA CALCULAR EL PRODUCTO DE LOS NUMEROS ENTEROS DEL 1 AL 10.
 ESTA REALIZADO  EN LENGUAJE C++.

#include<iostream.h>
#include<stdio.h>
#include<conio.h>
void main (void)
{
textcolor(13);
textbackground(0);
clrscr();
float n,k=1,mul=1,j=9;
int q,b;
for(int x=1;x<=80;x++)
{
gotoxy(x,1);
printf("*");
gotoxy(x,24);
printf("*");
}
for(int y=1;y<=24;y++)
{
gotoxy(1,y);
printf("*");
gotoxy(80,y);
printf("*");
}
gotoxy(18,3);printf(" PRODUCTO DE LOS NUMEROS ENTEROS DEL 1 AL 10" );
for (q=9;q<=61;q++)
{
gotoxy(q,7);cout<<"_";
gotoxy(q,9);cout<<"-";
}
gotoxy(5,5);cout<<" Al multiplicar la siguiente secuencia de numeros";

while(k<=10){
gotoxy(j,8);cout<<k<<" * ";
j=j+5;
mul=mul*k;
k++;
}
gotoxy(8,10);cout<<" el producto de esta serie es: "<<mul;

getch ();
}

No hay comentarios:

Publicar un comentario