What is my mistake in this code? | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
+ 1

What is my mistake in this code?

I would like write a Twin Prime challanges code, what could am i do? (My english is not good.) and Can if statement be used in loops? https://code.sololearn.com/cvQX1qgQdxXO/?ref=app

21st Apr 2018, 4:13 PM
Emir Dalfidan
Emir Dalfidan - avatar
4 Answers
+ 1
So, How am i declare a variable between two integers?
21st Apr 2018, 4:54 PM
Emir Dalfidan
Emir Dalfidan - avatar
+ 1
int x=0, y=15;
21st Apr 2018, 4:58 PM
michal
+ 1
Look my solution :) I find!
21st Apr 2018, 5:09 PM
Emir Dalfidan
Emir Dalfidan - avatar
0
you haven't used any loop maybe you want to replace the first if with while??? you can use if in any loop you use uninitialized variable x, so it is doesn't actually compile
21st Apr 2018, 4:28 PM
michal