Skip to main content

Questions tagged [while]

0 votes
1 answer
30 views

Im having trouble creating a code on C that after letting the user input a date it determines if the date is in a valid 24 hour format, any help would be greatly appreciated. Here's my code. #include &...
Jorhan López's user avatar
0 votes
2 answers
125 views

I am trying to make a pyramid of hashtags somehow which I haven´t figured out yet, and trying my way step by step. (I´m doing the Cs50 course) When I came this far the program is working wohoo so far ...
l_b's user avatar
  • 7
0 votes
1 answer
39 views

When I run the following code, it doesn't appear as if my while loop is being invoked because it never prints the print statement, but I cannot find a reason why it is not running the while loop. #...
M2718's user avatar
  • 5
0 votes
1 answer
593 views

def main(): x = 0 while x not in range (1,23): getheight() if x in range (1,23): break for i in range (x): for j in range (x - j): print (" "...
user avatar
0 votes
1 answer
58 views

I've just solved my mario.c pset1, everything seems to work, but when I enter a value over 23 like 50 or so, the code is still running and drawing the pyramid then re-prompt the height. I've tried to ...
Amine Marzouki's user avatar
1 vote
1 answer
130 views

All my program work well till I lost my first ball. After that, I'm not able to start with an other one. I thought I've controlled that with my second while loop. There the first part of my code in ...
CharlesD89's user avatar
0 votes
1 answer
134 views

My Do While Loop isn't working for some reason, the error is outlined below. Can anyone help me figure this out (I included the stdio and cs50 libraries)? int main(void); int n; { // error: expected ...
K. Roe's user avatar
  • 19
0 votes
1 answer
333 views

i wrote the following code in orde to get familiar with the while loop However , instead of executing the loop when i give a number lower than 1 it does the exact opposite !it executes the loops ...
VAPORAS's user avatar

15 30 50 per page