English Deutsch Français Italiano Español Português 繁體中文 Bahasa Indonesia Tiếng Việt ภาษาไทย
All categories

I have this basic progam that needs to be completed but I have no time ot complete it so I need some help, don't worry its not for a grade or anything just somethign that needs to get done.

Design a wage-calculation program with the following:
If employee's number(ID) is greater than or equal to 1000, the progam should read and annual salary and calc weekly pay - salary divided by 52.
If employee's number is less than 1000, wages are calc on an hourly basis - Hours over 40 are paid 1.5c the regular hourly rate.

Well that it so anyone know the program layout that minds to share because I have to get to class now.

2007-02-07 01:15:23 · 2 answers · asked by gatz1000 4 in Computers & Internet Programming & Design

2 answers

Hi,

Although your question was not very clear to me, still I have attempted to solve it for you. Go through the program and let me know if you want to make any kind of changes or not.

You can also mail me your doubts at coolcanc@yahoo.com

Solution to your query: -


#include
#include

void main()
{

clrscr();
long int eid, ann_sl, week_sal;
long int hrs, wages, sal;

cout<<"Please enter your employee id"< cin>>eid;

if (eid>1000)
{
cout<<"Please enter your annual income"< cin>>ann_sl;
week_sal=ann_sl/52;
cout<<"Your weekly pay is \t"< }
else
{
cout<<"Please enter number of hours you worked"< cin>>hrs;
wages=hrs/40;
sal=wages*1.5;
cout<<"Your hourly pay is\t"< }
}

2007-02-07 01:45:28 · answer #1 · answered by Santosh 2 · 0 0

use
if
else

2007-02-07 09:35:35 · answer #2 · answered by iyiogrenci 6 · 0 0

fedest.com, questions and answers