-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathstringchar.cpp
More file actions
28 lines (22 loc) · 807 Bytes
/
stringchar.cpp
File metadata and controls
28 lines (22 loc) · 807 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#include <iostream>
using namespace std;
const string FAVORITESODA = "Dr. Dolittle";
const char BESTRATING = 'A';
int main()
{
char rating;
string favoriteSnack;
int numberOfPeople;
int topChoiceTotal;
favoriteSnack = "crackers";
rating = 'B';
numberOfPeople = 250;
topChoiceTotal = 148;
cout << "The preferred soda is " << FAVORITESODA << endl;
cout << "The preferred snack is " << favoriteSnack << endl;
cout << "Out of " << topChoiceTotal << " people " << numberOfPeople << " chose these items!" << endl;
cout << "Each of these products were given a rating of " << BESTRATING;
cout << " from our expert tasters" << endl;
cout << "The other products were rated no higher than a " << rating << endl;
return 0;
}