문제

The variable X starts with the value 0. The variable Y starts with the value 5. Add 1 to X. Add 1 to Y. Add X and Y, and store the result in Y. Display the value in Y on the screen.

Output #1:

Pseudocode #1:

The logic of the question makes sense, but I do not even know where to start. Can someone explain and/or help me?

도움이 되었습니까?

해결책

Pseudocode:

X = 0;
Y = 5;
X = X + 1;
Y = Y + 1;
Y = X + Y;
display(Y);

I'll leave the maths to you...

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top