123456789101112131415161718192021222324252627282930313233343536373839
#include <iostream> #include <iomanip> #include <string> using namespace std; int main() { double DeLIGHTful, DoubleDeLIGHT, TripleDeLIGHT, total; string single; string doublee; string triple; cout << "Number of single scoop cones sold: "; cin >> single; cout << "Number of double scoop cones sold: "; cin >> doublee; cout << "Number of triple scoop cones sold: "; cin >> triple; DeLIGHTful = 1.49 * single; DoubleDeLIGHT = 2.49 * doublee; TripleDeLIGHT = 3.49 * triple; total = DeLIGHTful + DoubleDeLIGHT + TripleDeLIGHT; cout << "DeLIGHTful cones $" << setw(8) << setprecision(2) << fixed << DeLIGHTful << endl; cout << "Double DELIGHT cones $" << setw(8) << setprecision(2) << fixed << DoubleDeLIGHT << endl; cout << "Triple DeLIGHT cones $" << setw(8) << setprecision(2) << fixed << TripleDeLIGHT << endl; cout << "Total $" << setw(8) << setprecision(2) << fixed << total << endl; return 0; }
DeLIGHTful = 1.49 * single;