Program KolomBaris
Deklarasi
i,j,n:integer
Algoritma
read (n)
for (i=1 to i<=n) do
{ for (j=1to j<=n) do
{ write (i)
write (j)
write (' ') }
endfor
endfor
CODING
#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=1GOtNOy9XRjf7Y3AtIs_t4dqjGgtMxdnk
No comments:
Post a Comment