- 3

Anyone guess the output without running the code?

#include <iostream> using namespace std; int main(int argc, char *argv[]) { int num=1; while (num< 100) { num=num*3; cout << num <<endl; num++; } return 0; }

9th Oct 2021, 1:03 PM
Kunj Pandya
Kunj Pandya - avatar
3 Respostas
+ 1
Why?
9th Oct 2021, 1:10 PM
Simon Sauter
Simon Sauter - avatar
+ 1
I got answer but it is not as expected Simon Sauter
9th Oct 2021, 1:12 PM
Kunj Pandya
Kunj Pandya - avatar
+ 1
What do you get and what did you expect?
9th Oct 2021, 1:13 PM
Simon Sauter
Simon Sauter - avatar