Welcome to Code Forum!

Join a community that supports you and your coding journey from day one. We strive to be a friendly, supportive community that empowers everyone to be better developers. By registering with us, you'll be able to discuss, share and private message with other members of our community.

SignUp Now!

loop

  1. nakaly

    scanf in loop crashes IDE

    Hello World! I keep getting crashed my IDE when I enter a letter in the scanf instead of a number. I tried to use scanf's return value to check that it succesfully matches the input but it still crashes when I enter a letter. Thank you in advance for any help. int getMove(Board_t *self...
  2. A

    Explanation for below query

    I have this code from a project and I am not sure why J is set to n-2 in for loop for Checks forward Please help #include <stdio.h> #include <math.h> int main() { int test; printf("Enter the number of tests: "); scanf("%d", &test); for (int a=0; a < test; a++) { int...
  3. aartiyadav

    Java Infinite Loop in Java Error?

    Hello Everyone, I am new in this community and new to Java and am attempting to write code that takes the number of sides of a polygon and the length of each side as input and gives the area of the polygon as output. The JRE I am using says that my code will not run, possibly because of an...
  4. W

    Python Easy Python Help

    Hi, I just began python and made a dice simulator. I am having the following issues: 1)the random integer is always the same (it is a value from 1 to 6, but within the loop it is always the same). Can I fix this or perhaps this is because I'm using an online interpreter?2) After the loop goes...
  5. Ghost

    Python Super Quick Python Arrays & Loops Examples

    Hey all, I am sitting in my car waiting for my girlfriend to be done with work... sharing a car this morning ! So I decided to write up some basic Python loops. Our first array just holds some users and our simple for loop prints out a sentence saying each user is cool. users =...
Back
Top Bottom