{[ promptMessage ]}

Bookmark it

{[ promptMessage ]}

CSC 101

# CSC 101 - cout<< inches_square<<" ="<<...

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

// Program Area calculates the area of a square. // The user is prompted to enter the number of // inches on each side. / #include <iostream> #include <string> #include <math.h> # using namespace std; u int main () { //double inches, inches_square, meters_square; int hours, wages; double PAY = 24.75; string MyName1; string MyName2; /* cout << "This program will help you find the inches square and convert from squares inches to meters square." << endl; cout << "Have fun :-)" << endl; c cout << "\nEnter the number of inches on a side."<< endl; cout << "Press the return key:"; cin >> inches; inches_square = inches*inches; cout << "The area is " << inches_square << " square inches." << endl; cout << "Conversion from inches square to meters squares ." << endl; meters_square = inches_square * 0.00064516;
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: cout << inches_square << " = " << meters_square <<" meters square."; cin >> numbers; */ cout << "\n\t\t -=-=-=-=-=- Enter your name -=-=-=-=-=- " <<endl; cout << "\nEnter your first name: "; cin >> MyName1; cout << "Enter your last name: "; cin >> MyName2; cout << "Enter your hour of work: "; cin >> hours; if (hours<=40.0){ wages = hours*PAY; cout << "\n " <<endl; cout << MyName1 << " " << MyName2 << " " << "Your wages this month is: \$" << wages <<endl; } else if (hours>40.0){ wages = (hours*PAY)+(hours-40.0*1.5*PAY); cout << "\n " << MyName1 << " " << MyName2 << " ," << "your wage this month is: \$" << wages <<endl; } else { cout << "Wrong hours entered."<< endl; } return 0; }...
View Full Document

{[ snackBarMessage ]}

Ask a homework question - tutors are online