Ok so this is my code I have right now:
#include <cs50.h>
#include <stdio.h>
int get_positive_int(string prompt);
int main(void)
{
int i = get_positive_int("Height: ");
for (i = 0; i < 8; i++)
{
printf("#");
printf("\n");
}
}
// Ask for integer between 1 and 8
int get_positive_int(string prompt)
{
int n;
do
{
n = get_int("%s", prompt);
}
while (n > 8 || n <= 0);
return n;
}
Can someone please help! Thanks!