Program Bintang;
Deklarasi
n,i,j:integer;
Algoritma
read(n);
for (i<-1) to (i<=n) do
for (j<-1) to (j<=i) do
write(*);
endfor
KODING
#include <iostream>
using namespace std;
int main() {
int n,i,j;
cout<<"Masukan jumlah N=";cin>>n;
cout<<" "<<endl;
for (i=1;i<=n;i++)
{ for (j=1;j<=i;j++)
{cout<<"*"; }
cout<<endl;
}
system("PAUSE");
}
KELUARAN
Download program disini https://drive.google.com/open?id=1yQNzNOsAISHguoQcbWoGoiLP7XWBNPqw