iterative/loop statements.
ex. if length = 5
width = 10
display
**********
*........*
*........*
*........*
**********
thats what they instructed us to do...
and this is the code i made
main()
{int nLength, nWidth, A, B;
printf ("enter length: ");
scanf ("%d", nLength);
printf ("enter Width: ");
scanf ("%d", nWidth);
for(A=1;1<=nWidth;A++)
printf ("*");
printf ("\n");
for (A = 2; A <= nLength -1; A++)
printf ("*");
for (B = 2; B <= nWidth -1; B++)
printf ("*");
printf ("\n");
everytime i try my program it doesnt display the square its just blank...can any1 help me with this?

New Topic/Question
Reply




MultiQuote





|