[Solved] Stuck in infinite loop C#

The problem is your use of while loops. while(note != 1) There is nothing in the body of those loops that change that condition. So everytime the loop goes “okay… is note not equal to 1?”.. that condition is always true. So the loop executes again. solved Stuck in infinite loop C#

[Solved] How do i stop loop

First problem you would have with the current code is that once you have clicked the button it would result in lot of messages being sent even before user realizes that he sent that many messages, you need to induce a delay between each message. The next problem is that your app could hang as … Read more

[Solved] HOW to back for the beginning if the user press any key except 1 or 2 or 3? [closed]

Use do–while loop and set the condition to while(L != ‘1’ && L != ‘2’ && L != ‘3’);: do { L = getch(); switch (L) { case ‘1’ : system(“cls”); printf(“111111111111111”); break; case ‘2’ : system(“cls”); printf(“222222222222222”); break; case ‘3’ : system(“cls”); printf(“33333333”); break; default : sleep(0); } } while(L != ‘1’ && L … Read more

[Solved] Me not understanding do while loops [closed]

If the number input isn’t one that you check (1 to 5) then you hit: else if (a == 1) { std::cout << “\n”; return 1; } which will enter the if (because a is 1), print a new line and return from main ending your run. solved Me not understanding do while loops [closed]

[Solved] Break out of Python for loop

You could just iterate until 5 instead of 6 and print your message out of the loop: for counter in range(5): # Remove the if statement: # if counter == 5: # print(“”) # break myCar.accelerate() time.sleep(1) print(“Maximum speed reached!”) 1 solved Break out of Python for loop

[Solved] C# in Visual Studio [closed]

You may start with the largest number first, something like: foreach(number in positiveNumberArray) { if (number > 50) Console.WriteLine(“Out of Range”); else if(number > 40) Console.WriteLine(“Range 40-50”); else if(number > 30) Console.WriteLine(“Range 30-40”); else if(number > 20) Console.WriteLine(“Range 20-30”); else if(number > 10) Console.WriteLine(“Range 10-20”); else Console.WriteLine(“Range 0-10”); } Edit: To count the up the … Read more