#include <iostream>
using namespace std;
int main()
{
int sum,a,b;
a=4;
b=4;
sum=a+b;
cout<<sum;
cout<<sum;
}
Run Code Online (Sandbox Code Playgroud)
Q1为什么cout没有执行两次?
Q2为什么第二个cout给出不同的值?
为什么cout没有执行两次?
它执行两次。
为什么第二母题给出不同的价值?
两个输出均为8。
If that's not the case for you, then there may be something wrong with your compiler, your computer, the operating system, or maybe you are running a different program.