- Design the logic, using a looping structure, for a program that outputs every even number from 1 through 25 along with its s开发者_StackOverflowquare and cube.
Here is my Answer please I need to know if I am on the right track FYI it is the programming Logic not the actual code. I need your help thanks
If n > 0> 25 MOD 2 = o then
NMOD2 = 0
Else then
NMOD2 = (0)^2
End If
If NMOD2 = 0 then
NMOD2 = (0)^3
Um, like this?
for (int i = 1; i <= 25; i++) {
if (i % 2 == 0) {
cout << i << ' ' << i*i << ' ' << i*i*i << "\n\n";
}
}
sry i dont understand your pseudocode
精彩评论