Hey everyone I'm brand new to c programming and I'm trying to figure out how to draw a solid square using input from the user to give height and length to determine the number of asterisks to print. I'm having trouble figuring out the for loop part of it. Here's what I've written up so far:
Code:
#include <stdio.h>
int main(int argc, char *argv[]) {
int length;
int height;
printf("Please Enter Length: ");
scanf("%d", &length);
printf("Please Enter Height: ");
scanf("%d", &height);
for(/* input for length */)
printf("*");
for(/* input for height */)
printf("*");
printf("\n");
return 0;
}
The program is supposed to take the input the user entered for height and length and print the square based on those two numbers. So if the user entered "3" and "5" it would show:
***
***
***
***
***
If anyone could help me out and guide me to what I should be including in the for loop that would be greatly appreciated.