Questions tagged [do]
The do tag has no usage guidance.
4
questions
0
votes
3
answers
554
views
Do While Loop Bug in CS50.H with getInt()
I have two sets of similar Do While codes files, one with stdin scanf function and the other getInt() from cs50 lib. Both files compile in CS50 appliance. I expect the do while works the same but ...
0
votes
1
answer
128
views
Pset 1 Bug with Do While Loop
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 ...
0
votes
1
answer
536
views
do while loop not looping
I am having a problem with my do while loop.
do
{
//this thing
}
while (n < 0 && n > 23);
when I run it every time I enter a number ether valid or invalid it ends my program.
0
votes
1
answer
673
views
Do/while loop gives error of unused variable, pset1
I'm working on Pset1 and I keep getting an 'unused variable' error in my do/while loop. This is my code-
int main(void)
{
printf("How much change is owed?\n");
float fcents = GetFloat()*...