#include <iostream>
int main()
{
int a{ 10 };
int b{ 12 };
int c{ 15 };
std::cerr << "a="<<a<<std::endl;
std::cerr <<"Let's execute a++" << std::endl;
a++;
std::cerr << "a=" << a << std::endl;
std::cerr << std::endl;
std::cerr << "b=" << b << std::endl;
std::cerr << "Let's execute ++b" << std::endl;
++b;
std::cerr << "b=" << b << std::endl;
std::cerr << std::endl;
std::cerr << "a=" << a << " b=" << b << std::endl;
std::cerr << "Let's execute c = a + ++b" << std::endl;
c = a + ++b;
std::cerr << "a=" << a << " b=" << b << " c=" <<c<<std::endl;
std::cerr << std::endl;
std::cerr << "a=" << a << " b=" << b << std::endl;
std::cerr << "Let's execute c = a +b++" << std::endl;
c = a + b++;
std::cerr << "a=" << a << " b=" << b << " c=" << c << std::endl;
return 0;
}
Comments
Leave a comment