C -CLAY- Honorary Poster Joined Jun 29, 2018 Posts 133 Reaction 304 Points 165 Sep 22, 2018 #1 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; } } Attachments You do not have permission to view the full content of this post. Log in or register now.
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; } }
F fazz12 Honorary Poster Sep 23, 2018 #4 not sure if naresolve mo na yan, pero pano kung ilagay ko e saktong 40 hehe, like workinghours==40? less and greater than 40 lang ang conditions mo e.
not sure if naresolve mo na yan, pero pano kung ilagay ko e saktong 40 hehe, like workinghours==40? less and greater than 40 lang ang conditions mo e.
C -CLAY- Honorary Poster Sep 23, 2018 TS TS #5 fazz12 said: not sure if naresolve mo na yan, pero pano kung ilagay ko e saktong 40 hehe, like workinghours==40? less and greater than 40 lang ang conditions mo e. Click to expand... >= po tsaka di ko nainput yung rate hahaha
fazz12 said: not sure if naresolve mo na yan, pero pano kung ilagay ko e saktong 40 hehe, like workinghours==40? less and greater than 40 lang ang conditions mo e. Click to expand... >= po tsaka di ko nainput yung rate hahaha