0
less.c:11:15: error: expected expression
   while (n < = 0 || n > 23);
              ^
1 error generated.
make: *** [less] Error 1

Please help! I keep getting this error when attempting to compile. See code below. Thank you for any suggestions.

#include <cs50.h>
#include <stdio.h>

int main(void)
{
  int n;

  do{ n = get_int ("Height:  "); }

   while (n < = 0 || n > 23);
0

try losing the space between < and =.

If this answers your question, please click on the check mark to accept. Let's keep up on forum maintenance. ;-)

1
  • That worked! Thank you! – Astronut27 Jul 4 '18 at 19:38

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .