assignment14 - / if(friut == "Pears") {...

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

View Full Document Right Arrow Icon
#include<iostream> #include<string> using namespace std; u int main () i { //APPLES string friut, type; s cout << "Apples,Oranges or Pears? "; getline(cin, friut); if (friut == "Apples") i { cout<< "Golden Delicious, Granny Smith or MacIntosh? "; getline(cin,type); } //ORANGES if(friut == "Oranges") { cout<< "Valencia, Blood or Navel? "; getline(cin, type); g } //Pears
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: / if(friut == "Pears") { cout<< "Bartlett, Bosc or Comice? "; getline(cin, type); g } //Anything else / if (friut != "Oranges" && friut != "Pears" && friut != "Apples") { cout << "Next time please enter one of the friuts requested!"<< endl; c } cout << "You have selected " << type << " " << friut << endl; c }...
View Full Document

This note was uploaded on 01/11/2010 for the course CMPSC 101 taught by Professor Drobish,renee during the Summer '07 term at Pennsylvania State University, University Park.

Ask a homework question - tutors are online