* * * * * * * * * * * * * * * * * * * * * * * * * * * * * *
#include<stdio.h>
#include<conio.h>
main()
{
int i,j,n;
clrscr();
printf("Enter number : ");
scanf("%d",&n);
for(i=1;i<=n;i++)
{
for(j=1;j<=n;j++)
{
printf("*");
}
printf("\n");
}
getch();
}
thank you bro…..its very useful to me
Glad to know that this is helping you 🙂 share this with all your friends.
how to know the logic behind output before CODING
practice ! practice !! practice !!!
All you need to do is practice these 101 programs, its the core that is necessary to build programming logic/skill.
Practice may become boring over time, so better share these things with your friends so that you can discuss, code together and hence it can become fun!
The output in the form of (*) shown at the top will be valid if we enter the value of n to be 4….. Is it…..
Hi Aditya, its basically for any number of “*” 🙂
hi, i hav started to learn pgmg . can i j jus knw why j variable is used here. is it only for nxt line. ?? wil i an j act simultaneously for displaying asterisk.