实例 C++ 用逗号分隔的列表声明许多相同类型的变量

x
 
#include <iostream>
using namespace std;
int main() {
  int x = 5, y = 6, z = 50;  
  cout << x + y + z;
  return 0;
}
                    

输出结果

61