#include <iostream> int main(void) { int a = 100, b = 40; //理解++在前还后的区别; a = b++; //a = b ; b= b+1; //a = ++b; //b = b+1; a = b; std::cout << a << std::endl; std::cout << b << std::endl; return 0; }
时间: 2024-11-25 18:52:53
#include <iostream> int main(void) { int a = 100, b = 40; //理解++在前还后的区别; a = b++; //a = b ; b= b+1; //a = ++b; //b = b+1; a = b; std::cout << a << std::endl; std::cout << b << std::endl; return 0; }