I'm new at programming and wish to learn about for loops could someone help me with my code I am suppose to display an asterisk equal to the number between 2 and 20 depending on what the user entered.
Here is my code and I don't know how to proceed with this please help:
#include "stdio.h"
#include "iostream"
main ()
{
int num1, x;
printf("Enter a number between 2 and 20: ");
scan ("%d", &num1);
getchar();
while (num1 > 1)
{
for (i=1; i<=num1;i++)
{
printf ("*");
}