I want to run the loop unless n>0 and less than 23. I have written the code below but it doesn't seem to be working. Although if I write one condition at a time the program works fine. But when I use the && operator it fails
#include<stdio.h>
#include<cs50.h>
int main(void)
{
int i, j, k, n;
do
{
printf("Height: ");
n = GetInt();
}
while(n<0 && n>23);
for (i = 1; i <= n; i++)
{
for (k = 1; k <= n - i; k++)
{
printf(" ");
}
for (j = 0; j <= i; j++)
{
printf("#");
}
printf("\n");
}
}