0
Why my code doesnt work?
I wrote code true but sololearn dont acces me to use jump fanction Code : c++ #include <iostream> using namespace std; int main() { int a, b; cin >> a; int c = a - 50; int d = 50 - c; if (d > 50); d = d - 50; jump 10; else; cout << d; return 0; }
8 ответов
+ 4
Are you trying to solve the transportation code coach challenge? if so, then you should follow the task suggestion, to make use of the modulo operator in calculation.
+ 3
What is jump mean by there, what it can do there? Is it valid statement in cpp? Sry, I never heard about..
Between you have a semicolon after if statement. Remove it.. after else also.
+ 1
Did you find the answer ? if not
1.remove semicolons for if and else statement.
2.there is no statement called jump. There are two statements break and continue.
3. give instruction after else statement.
4. If you want to write more than two lines for decision making statements, you need to use curly braces.
5. you declared 'b' but didn't used.
6.I don't know what your purpose by writing this code, but it will only give negative value because you are subtracting again and again.
0
Remove the semi colon on else
0
Ipang i dont know how do modulo operator works
What is modulo