sec03_aakashs_gascost - Card"<<endl...

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

View Full Document Right Arrow Icon
#include <iostream> #include <iomanip> using namespace std; int main () { float gallons; float price; float option; cout<<"Amount of Gas Bought"<< endl; cin>> gallons; cout<<"Press 0 If You Are Paying With Cash, Press 1 If You Are Paying With Credit
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: Card"<<endl; cin>>option; if (option==1) { price= 3.021*gallons; } else price= 3.121*gallons; cout<<"You will pay: $ "<< setprecision(2) << fixed << price<< endl; return 0; } /*Collarborating with Shiv Desai and Cameron DeAngeles*/...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online