Selamat mencoba dan semoga bermanfaat!
Program I :
#include
<iostream.h>
#include
<conio.h>
main() {
int a;
cout<<"Masukkan
batas : ";cin>>a;
for ( int b=a; b>=1;
b--)
{
for(int i=b;i>=1;i--)
{
cout<<b*i<<"
";
}
cout<<endl;
}
getch();}
Program II :
#include <iostream.h>
#include <conio.h>
main() {
int a;
cout<<"\nMasukkan batas :
";cin>>a;
for ( int b=1; b<=a; b++)
{
cout<<endl;
for(int
i=1;i<=b;i++)
{
cout<<" * ";
}
}
getch();}
0 komentar:
Posting Komentar