0
Почему код не работает
#include <iostream> using namespace std; int main() { int num = 1; while (num < 6) { cout << "Number: " << num << endl; num=num+1; } return 0; }
2 Respuestas
+ 7
Slavik ,
the does work properly, it outputs the numbers from 1 up to 5. if you expect to get also the number of 6, you should use the conditional:
while (num <= 6)
happy coding!
+ 1
Где ошибка ?