Di ko po kasi mapalabas yung computation palaging 0 lumalabas
Here is my code.
#include <iostream>
using namespace std;
int main() {
double wages;
double workinghours;
double rate;
cout << "Enter an working hours: ";
cin >> workinghours;
if (workinghours < 40)
{
wages = (rate * 40)+(1.5*rate)*(workinghours-40);
cout<<"Your wages is: " << wages << endl;
}
else if ( workinghours > 40) {
wages = rate*workinghours;
cout << "Your wages is: " << wages << endl;
}
}
Here is my code.
#include <iostream>
using namespace std;
int main() {
double wages;
double workinghours;
double rate;
cout << "Enter an working hours: ";
cin >> workinghours;
if (workinghours < 40)
{
wages = (rate * 40)+(1.5*rate)*(workinghours-40);
cout<<"Your wages is: " << wages << endl;
}
else if ( workinghours > 40) {
wages = rate*workinghours;
cout << "Your wages is: " << wages << endl;
}
}
Attachments
-
You do not have permission to view the full content of this post. Log in or register now.