2022-08-12 14:59:08 +01:00
|
|
|
#include <iostream>
|
2022-08-13 00:34:25 +01:00
|
|
|
|
2022-08-15 12:48:53 +01:00
|
|
|
int getValue()
|
|
|
|
{
|
|
|
|
std::cout << "Enter an integer: ";
|
|
|
|
|
|
|
|
int x{};
|
|
|
|
std::cin >> x;
|
|
|
|
return x;
|
|
|
|
}
|
|
|
|
|
2022-08-12 14:59:08 +01:00
|
|
|
int main()
|
|
|
|
{
|
2022-08-15 12:48:53 +01:00
|
|
|
std::cout << getValue() + (getValue() * getValue()); // a + (b * c)
|
|
|
|
return 0;
|
2022-08-12 14:59:08 +01:00
|
|
|
}
|