Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- using namespace std;
- int main() {
- double sleeveSize, frontSize;
- cin >> sleeveSize >> frontSize;
- string fabricTypes, tieOrNot;
- cin >> fabricTypes >> tieOrNot;
- double sum = (sleeveSize * 2 + frontSize * 2) * 1.1 / 100;
- if (fabricTypes == "Linen") {
- sum *= 15;
- }
- else if (fabricTypes == "Cotton") {
- sum *= 12;
- }
- else if (fabricTypes == "Denim") {
- sum *= 20;
- }
- else if (fabricTypes == "Twill") {
- sum *= 16;
- }
- else if (fabricTypes == "Flannel") {
- sum *= 11;
- }
- sum += 10;
- if (tieOrNot == "Yes") {
- sum *= 1.2;
- }
- printf("The price of the shirt is: %.2flv.\n", sum);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement