gedit quest1.cpp &
g++ quest1.cpp -o quest1x
./quest1x
There are four questions, two on each side of two pages,
and you have 60 minutes to complete the quiz.
double baseValue, increment, fineTune, total; baseValue = 2.5; increment = 10; fineTune = 1.0; total = baseValue + increment; std::cout << "Enter a base value (e.g. 99.9): "; std::cin >> baseValue; total = baseValue; std::cout << "Enter an increment value (e.g. 6.7): "; std::cin >> increment; total = baseValue + increment; total = total + fineTune; std::cout << "The final total is " << total << std::endl; |