Computers & Internet Logo

Related Topics:

Posted on Aug 04, 2009

Else if statement on turbo c, # hour worked: bonus: hour<40 & >=45 P500 hour <40 &>=35 P300 hour >20 & <=30 P150 display bonus,salary and total salary

3 Answers

Rakesh Kumar

Level 1:

An expert who has achieved level 1.

All-Star:

An expert that got 10 achievements.

MVP:

An expert that got 5 achievements.

Vice President:

An expert whose answer got voted for 100 times.

  • Contributor 296 Answers
  • Posted on Aug 05, 2009
Rakesh Kumar
Contributor
Level 1:

An expert who has achieved level 1.

All-Star:

An expert that got 10 achievements.

MVP:

An expert that got 5 achievements.

Vice President:

An expert whose answer got voted for 100 times.

Joined: Jun 08, 2009
Answers
296
Questions
0
Helped
98461
Points
14

Hi, First of all please check the conditions but as far as i understand the conditions the program would be like this-
#include<stdio.h> #include<conio.h> void main() { int salary,bonus,totalsalary,hours; printf("enter salary"); scanf("%d",&salary); printf("enter hours"); scanf("%d",&hours); if(hours<45 && hours>=40) { bonus=500; } else { if(hours<40 && hours>=35) { bonus=300; } else { if(hours<=30 && hours>20) { bonus=150; } else { bonus=0; } } } totalsalary=salary+bonus; printf("Salary=%d",salary); printf("Bonus=%d",bonus); printf("Total Salary=%d",totalsalary); getch(); }
But the conditiosn given by you are not seems to be correct.Just correct the conditions value if wrong and run the program Thanks! mannu_rakesh

Anonymous

Level 1:

An expert who has achieved level 1.

New Friend:

An expert that has 1 follower.

  • Contributor 1 Answer
  • Posted on Sep 09, 2010
Anonymous
Contributor
Level 1:

An expert who has achieved level 1.

New Friend:

An expert that has 1 follower.

Joined: Sep 09, 2010
Answers
1
Questions
0
Helped
4026
Points
2
Ad

raffy_14_14

Level 1:

An expert who has achieved level 1.

  • Contributor 1 Answer
  • Posted on Sep 28, 2012
raffy_14_14
Contributor
Level 1:

An expert who has achieved level 1.

Joined: Sep 28, 2012
Answers
1
Questions
0
Helped
4026
Points
0

Bket gnun .. pumapatong ung ELSE sa IF ko !

Add Your Answer

×

Uploading: 0%

my-video-file.mp4

Complete. Click "Add" to insert your video. Add

×

Loading...
Loading...

Related Questions:

1helpful
1answer

How to buy a kick scooter?

For whom you wanna buy?how old she or he is?If you want to buy a kick scooter for kids or adult then click here for best kick scooter Best Kick Scooter For Kids Adults In 2018 Ride Commute Have Fun
Mar 12, 2018 • Motorcycles
0helpful
1answer

IF STATEMENT

Let x be the total number of hours worked. Let w be the total wage.
If x < or = 40, w=16.5 x,
Else w= 16.5*40 +26.5*(x-40)
0helpful
1answer

What are the other ways to unlock without a turbo sim card

Hi. Do you want to unlock your iPhone through any other method than using a Turbo SIM card? If so, you can visit Mobile-Unlocker.com and get the remote unlocking service. This method of unlocking is Safe, Simple, Affordable, Quick and Permanent. It doesn't require a jailbreak too.
-<()>--<()>--<()>--<()>--<()>--<()>--<()>-
.............UNLOCKING INSTRUCTIONS.............
-<()>--<()>--<()>--<()>--<()>--<()>--<()>-
1. Wait for us to send you an email saying your phone has been activated or remotely unlocked.
2. Install the latest version of iTunes.
3. Make sure your Apple iPhone phone software is updated to the latest version using the iTunes software.
4. Connect your Apple iPhone to iTunes with a NOT ACCEPTED SIM card.
5. Wait until iTunes detects your Apple iPhone.
6. Disconnect your Apple iPhone and reconnect it after 10 seconds.
7. Your Apple iPhone is now unlocked.
Jul 08, 2014 • Cell Phones
0helpful
1answer

Account Disabled Your account has been disabled. If you have any questions or concerns, you can visit our FAQ page &lt;a...

Thanks for visiting FixYa!

Click here for online form (if you violated the facebook terms and statement of rights and responsibilities)
Click here for other online form (if your account was blocked because of security reasons - phishing, hacking, scam, etc)...
0helpful
2answers
0helpful
1answer

I cannot send attachments or email from yahoo. I have run virus and spyware programs. When I try to reply or forward this message comes up. &lt;html&gt; &lt;head&gt; ...

Try downloading IE8, Also I Suggest Update your Adobe Flash Player and Java script to clear your
cache, cookies, and browsing history. If all eles fale's try using yahoo classic email. Please rate my answer. Best of luck to you.
Jan 31, 2011 • Yahoo Mail
29helpful
1answer

How do i set time for an Accurian 40-141 iPod Alarm Clock with Radio?

SETTING THE CLOCK TIME: 1. In standby mode, press and hold MODE to enter the clock time setting mode. 2. Press |<< TUNE/SKIP >>| to switch between 12-hour and 24-hour display. Press MODE to confirm the selection. The digits flash. 3. Press or hold |<< TUNE/SKIP >>| to set the hour and minute. Press MODE to confirm.
0helpful
1answer

Take input from user and tell either the letter is capital or small a...z A...Z should be solved with if else statement

Use asci code:
char input[]; or string

if(intput[0] <=90 && input[0] >=65) write capital
if(intput[0] <=122 && input[0] >=97) write small
or easy:
if(intput[0] <='Z' && input[0] >='A') write capital
if(intput[0] <='z' && input[0] >='a') write small

input[0] it's the first letter.
If you wanna use the asci press and hold alt then input the number in the Num Lock from the right (only!!) then relyse the alt the it's will write the char from the asci you write.
Rate me please, thanks.
0helpful
1answer

Mrps

Use this as a reference
=IF(H4>=70,"A+",IF(H4>=60,"A", IF(H4>=55,"B+",IF(H4>=50,"B",IF(H4>=45,"C+",IF(H4>=40,"C",IF(H4<=39,"F")))))))

A+ >70 A >60 B+ >=55 B >=50 C+ >=45 C >=40 F <40
Not finding what you are looking for?

4,036 views

Ask a Question

Usually answered in minutes!

Top Computers & Internet Experts

Grand Canyon Tech
Grand Canyon Tech

Level 3 Expert

3867 Answers

Brad Brown

Level 3 Expert

19187 Answers

Cindy Wells

Level 3 Expert

6688 Answers

Are you a Computer and Internet Expert? Answer questions, earn points and help others

Answer questions

Manuals & User Guides

Loading...