+ 1

There print the 1000 why how it can be 500

#include <iostream> using namespace std; int main() { int a =500; a = 1000; cout << a; return 0; }

8th Oct 2019, 5:29 AM
Abdul Islam
Abdul Islam  - avatar
2 ответов
+ 9
The code outputs 1000 for me. That is the correct output since: a = 1000 means that the variable is assigned the value "1000". Hope that helps!
8th Oct 2019, 5:34 AM
Jayden LeCorps
Jayden LeCorps - avatar
+ 3
Please include C++ in Relevant Tags 👍
8th Oct 2019, 6:30 AM
Ipang