// Computer Science I, Lab I
// Author: Joseph Devito
// Title: Lab I Questions
// February 11, 2008
#include "stdafx.h"
#include <iostream>
using namespace std;
int main ()
{
//Problem 1
{
double hourly_wage, hours_per_week, number_of_weeks, total_hours;
cout<< "Please enter your hourly wage " <<endl;
cin>> hourly_wage;
cout<< "Please enter number of hours worked per week" <<endl;
cin>> hours_per_week;
cout<< "Please enter the number of weeks worked" <<endl;
cin>> number_of_weeks;
total_hours = hourly_wage * hours_per_week * number_of_weeks;
cout<< "You made..." << total_hours << " dollars!" << endl;
}
//Problem 2
{
double a,b,x,y,z;
cout<< "Please type in the value for variable x \n";
cin>> x;
cout<< "Please type in the value of variable y \n";
cin>> y;
cout<< "Please type in the value for variable z \n";
cin>>z;
a = (x+y+z) / (x*y*z);
cout<< "a is equal to... " << a<< endl;
b = (x=y) / (y+z);
cout<< "b is equal to... " << b<<endl;
}
//Problem 3
{
int num1, num2, num3;
cout<< "Please enter the value for number 1" <<endl;
cin>> num1;
cout<< "Please enter the value for number 2" <<endl;
cin>> num2;
cout<< "Plese enter the value for number 3" <<endl;
cin>> num3;
if (num1>num2) && (num1>num3);
cout<<num1<< "is the greatest number"; <<enld;
if (num2>num1) && (num2>num3);
cout<<num2<< "is the greatest number" <<endl;
if (num3>num1) && (num3>num2);
cout<<num2<< "is the greatest number" <<endl;
}
return 0;
}