" Life is not a problem to be solved but a reality to be experienced! "
© Copyright 2013 - 2024 KUDO.TIPS - All rights reserved.
----------------------------------------------------------------------
#include "iostream.h"
#include "conio.h"
main() {
int n = 0;
int i,j;
cout<<"Input : " ;
cin>>n;
cout<<"Output : \n";
for(i = 1; i <= n; i++) {
for(j = 1; j <= n; j++) {
cout<<j;
}
cout<<"\n";
}
getch();
}
Pake C
----------------------------------------------------------------------------
#include "stdio.h"
#include "conio.h"
main() {
int n = 0;
int i,j;
printf("Input : ");
scanf("%d", &n);
printf("Output : \n");
for(i = 1; i <= n; i++) {
for(j = 1; j <= n; j++) {
printf("%d",j);
}
printf("\n");
}
getch();
}