PROGRAMA PARA CALCULAR EL PRODUCTO DE LOS NUMEROS ENTEROS DEL 11 AL 20.
ESTA REALIZADO EN LENGUAJE C++.
#include<iostream.h>
#include<stdio.h>
#include<conio.h>
void main (void)
{
textcolor(5);
textbackground(7);
clrscr();
double k=11,mul=10;
int q,b,j=9;
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 11 AL 20" );
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<=20){
gotoxy(j,8);cout<<k<<" * ";
j=j+5;
mul=mul*k;
k++;
}
gotoxy(8,10);cout<<" el producto de esta serie es: "<<mul;
getch ();
}
ESTA REALIZADO EN LENGUAJE C++.
#include<iostream.h>
#include<stdio.h>
#include<conio.h>
void main (void)
{
textcolor(5);
textbackground(7);
clrscr();
double k=11,mul=10;
int q,b,j=9;
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 11 AL 20" );
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<=20){
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