"I have great news for you. Here are some exercises to reinforce your skills. Work on them every day, and your competence will grow exponentially. They were specially designed for IntelliJ IDEA."
int b = 0;
while (true){
int a = Integer.parseInt(bb.readLine());
if (a<=-1){
b = b+a;
System.out.println(b);
break; }
b=b+a;
}
please cna i get help as to why this SAYS
Be sure that the program works correctly with negative numbers.
Hi guys! To my mind, the Best way of learning the Codegym course is following.
(1) Solve tasks by your own, using the Codegym help section, comments, or even web search - its really ok! Get used to it.
(2) After you Verified a task, Download correct solution. >> Push the Help button in the task menu.
(3) Correct your own solution in efficient and short way.
Actually, it was the best way to correct my code and understand it.
Sometimes I had Bullshit-code, dont know how it worked %)))))
Could someone please check my code for "Somewhere in the middle"? It outputs the middle number, but when I try to verify I dont pass the "Program should display middle number". Any help would be great! Thanks
BufferedReader reader = new BufferedReader(new InputStreamReader(System.in));
byte a = Byte.parseByte(reader.readLine());
byte b = Byte.parseByte(reader.readLine());
byte c = Byte.parseByte(reader.readLine());
if ((a<=b && a>=c) || (a>=b && a<=c)){
System.out.println(a);
} else if ((b<=a && b>=c) || (b>=a && b<=c)){
System.out.println(b);
} else {
System.out.println(c);
}
GO TO FULL VERSION