What is the output of the following C++ code?
x = 100;
y = 200;
if (x > 100 && y <= 200)
cout << x << " " << y << " " << x + y << endl;
else
cout << x << " " << y << " " << 2 * x - y << endl;
#include <iostream>
using namespace std;
int main() {
   int x = 100;
   int y = 200;
   if (x > 100 && y <= 200){
       cout << x << " " << y << " " << x + y << endl;
   }
   else {
       cout << x << " " << y << " " << 2 * x - y << endl;
      Â
   }
}
100 200 0
Comments
Leave a comment