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