assignment22 - choice =="strawberry" topping =...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
#include <iostream> using namespace std; int main() { string softserve, topping, sprinkles; string choice; while( sprinkles == "") { if( softserve == "" ) cout << "Do you want chocolate, vanilla or twist?" << endl; if( topping == "") cout << "Hot fudge, chocolate or strawberry sauce?" << endl; if( sprinkles == "") cout << "Do you want sprinkles (yes/no)?" << endl; getline(cin, choice); if( choice == "yes" || choice =="no" ) sprinkles = choice; if( choice == "hot fudge" || choice =="chocolate" ||
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: choice == "strawberry" ) topping = choice; if( sprinkles == "" && topping == "" && softserve =="") if( choice == "chocolate" || choice =="vanilla" || choice == "twist" ) softserve = choice; } if (sprinkles == "yes") cout << "You ordered " << softserve << " ice cream with " << topping << " sauce and sprinkles." << endl; else cout << "You ordered " << softserve << " ice cream with " << topping << " sauce without sprinkles." << endl; cout << "Press a key to continue. .." << endl; system("pause>nul"); }...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online