BZU PAGES: Find Presentations, Reports, Student's Assignments and Daily Discussion; Bahauddin Zakariya University Multan Right Header

HOME BZU Mail Box Online Games Radio and TV Cricket All Albums
Go Back   BZU PAGES: Find Presentations, Reports, Student's Assignments and Daily Discussion; Bahauddin Zakariya University Multan > Institute of Computing > Bachelor of Science in Information Technology > BsIT 2nd Semester > Object Oriented Programming


Reply
 
Thread Tools Search this Thread Rate Thread Display Modes
  #1  
Old 08-03-2011, 11:55 PM
bonfire's Avatar
M.Arsalan Qureshi

 
Join Date: Oct 2008
Location: Garden Town, Multan Cantt
Posts: 616
Program / Discipline: BSTS
Class Roll Number: 09-31
bonfire has a reputation beyond reputebonfire has a reputation beyond reputebonfire has a reputation beyond reputebonfire has a reputation beyond reputebonfire has a reputation beyond reputebonfire has a reputation beyond reputebonfire has a reputation beyond reputebonfire has a reputation beyond reputebonfire has a reputation beyond reputebonfire has a reputation beyond reputebonfire has a reputation beyond repute
Default Program to enter salary and output income tax and net salary

Program to enter salary and output income tax and net salary


#include <iostream.h>
#include <conio.h>

void main()
{
clrscr();
int itrate;
float salary,itax,nsalary=0;
cout << "Enter the salary : ";
cin>>salary;
if(salary>15000)
{
itax=salary*30/100;
itrate=30;
}
else if(salary>=7000)
{
itax=salary*20/100;
itrate=20;
}
else
{
itax=salary*10/100;
itrate=10;
}
nsalary=salary-itax;
cout << "Salary = $" << salary << endl;
cout << "Your income tax @ " << itrate << "% = $" << itax << endl;
cout << "Your net salary = $" << nsalary << endl;
getch();
}
This program takes in the salary of the employee as a screen input from the user.

It then deducts the income tax from the salary on the following basis :

30% income tax if the salary is above $15000.

20% income tax if the salary is between $7000 and $15000.

10% income tax if the salary is below $7000.

The salary, income tax and the net salary is then outputted using the 'cout' command.

Sample Input 12000
Sample OutputSalary = $12000
Your income tax @ 20% = $2400
Your net salary = $9600

__________________

Reply With Quote
Reply

Tags
enter, income, net, output, program, salary, tax


Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)
 
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
Program to enter a letter and output the next 2 letters bonfire Object Oriented Programming 3 10-03-2011 12:25 PM
Program to enter three integers and output the smallest integer using IF bonfire Object Oriented Programming 0 09-03-2011 12:28 AM
Program to enter a character and output its ASCII code bonfire Object Oriented Programming 0 09-03-2011 12:14 AM
Program to enter an integer and output it in the reversed form bonfire Object Oriented Programming 0 08-03-2011 11:59 PM
Program to enter an integer and output its 15 multiples bonfire Object Oriented Programming 0 01-03-2011 03:13 PM

Best view in Firefox
Almuslimeen.info | BZU Multan | Dedicated server hosting
Note: All trademarks and copyrights held by respective owners. We will take action against any copyright violation if it is proved to us.

All times are GMT +5. The time now is 01:45 PM.
Powered by vBulletin® Version 3.8.2
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.