Write a Program that generates the following output:
10
20
19
Use an Integer constant for the 10, an arithmetic assignment operator to generate
the 20, and a decrement operator to generate the 19.
#include <iostream>
int main()
{
const int C = 10;
int A = C * 2;
int B = A;
--B;
std::cout << C << "\n";
std::cout << A << "\n";
std::cout << B << "\n";
}
Comments
Leave a comment