123456789101112131415161718192021222324252627282930313233343536 |
- #include <iostream>
- struct inflatable // structure declaration
- {
- char name[20];
- float volume;
- double price;
- };
- int main()
- {
- using namespace std;
- inflatable guest =
- {
- "Glorious Gloria",
- 1.88,
- 29.99
- };
- inflatable pal =
- {
- "Audacious Arthur",
- 3.12,
- 32.99
- };
- cout << "Expand your guest list with " << guest.name;
- cout << " and " << pal.name << "!\n";
- cout << "You can have both for $";
- cout << guest.price + pal.price << "!\n";
-
- return 0;
- }
|