I recently just tipped my toes into the water of CS50 last week, I'm completely new to this so I need a bit of constructive critisism. I was completed stumped at first, but I got somewhat close - not sure if it is the proper way but that's why I came to you guys. (also i'm not sure why i'm getting the two extra periods each line.) Thanks!
#include <cs50.h>
#include <stdio.h>
//declare integers
int row, space,height,hash;
int main(void)
{
//get integer
do
{
height = get_int("Height: ");
}
while (height <= 0 || height > 8);
if (height > 0 || height <= 8)
//row
for (row = 0; row < height; row++)
{
//create spaces
for (space = 0; space <= height - row; space++)
{
printf(".");
}
//create hash
for (hash = 0; hash <= row; hash++)
{
printf("#");
}
//new line
for (int line = 0; line <= 0; line++)
{
printf("\n");
}
}
}