// Fawaz Joseph // Cosc 112 // 3/23/2010 // This program will count the prices o
ID: 3617658 • Letter: #
Question
// Fawaz Joseph
// Cosc 112
// 3/23/2010
// This program will count the prices of orders made for apicture frame
#include<iostream>
using namespace std;
int main()
{
double frame_regular frame_fancy frame_totallength width color_cost crown_cost crown_amount;
bool crown
string white Regular Fancy type color;
cout<<"Enter the length and width, ininches, of the picture";
cout<<"Length: ";
cin>>length;
cout<<"Width: "
cin>>width;
cout<<endl;
cout<<"Enter the type of frame you want;Regular or Fancy: "
cin>>type
if (string=Regular)
{
cout<<"A Regular Picture frame would cost25 cents per frame. "<<endl;
frame_regular=width*.10;
cout<<"That would cost"<<frame_regular<<endl;
cout<<"What color would you like yourframe to be: "<<endl;
cin>>color;
if (color=white)
{
cout<<"No Additional Cost";
color_cost=0;
}
if (color!=white)
{
cout<<"Coloring cost 10 cents perinch"
color_cost=.10*width
}
cout<<"Would you like to put crown on topof the frame: "
cin>>crown
if (crown=Yes)
{
cout<<"That would cost 35 cents percrown."<<endl;
cout<<"How many crowns do you want";
cin>>crown_amount;
crown_cost=.35*crown_amount;
else
{
cout<<"No additional cost";
crown_cost=0
}
frame_total=frame_regular+color_cost+crown_cost;
cout<<"The total cost of your order:$"<<total
}
if (string=Fancy)
{
cout<<"A Fancy Picture frame would cost 15cents per frame. "<<endl;
frame_fancy=width*.15;
cout<<"That would cost"<<frame_fancy<<endl;
cout<<"What color would you like yourframe to be: "<<endl;
cin>>color;
if (color=white)
{
cout<<"No Additional Cost";
color_cost=0;
}
if (color!=white)
{
cout<<"Coloring cost 10 cents perinch"
color_cost=.10*width
}
cout<<"Would you like to put crown on topof the frame: "
cin>>crown
if (crown=Yes)
{
cout<<"That would cost 35 cents percrown."<<endl;
cout<<"How many crowns do you want";
cin>>crown_amount;
crown_cost=.35*crown_amount;
else
{
cout<<"No additional cost";
crown_cost=0
}
frame_total=frame_fancy+color_cost+crown_cost;
cout<<"The total cost of your order:$"<<total
}
system("pause");
return(0);
Explanation / Answer
please rate - thanks I fixed a ton of syntax errors. But not knowing what theexact specs of the program are I can do no more // Fawaz Joseph // Cosc 112 // 3/23/2010 // This program will count the prices of orders made for apicture frame #include using namespace std; int main() { double frame_regular, frame_fancy, frame_total,length, width, color_cost; double crown_cost, crown_amount,total; string white="white", Regular="Regular",Fancy="Fancy", type, color,crown; coutRelated Questions
Navigate
Integrity-first tutoring: explanations and feedback only — we do not complete graded work. Learn more.