1
0
LearningCPP/main.cpp

22 lines
320 B
C++

#include <iostream>
int getValue()
{
std::cout << "Enter an integer: ";
int x{};
std::cin >> x;
return x;
}
int main()
{
int a{ getValue() };
int b{ getValue() };
int c{ getValue() };
std::cout << a + (b * c); // order of eval doesn't matter now
return 0;
}