Click here to Skip to main content
15,883,705 members
Please Sign up or sign in to vote.
1.00/5 (3 votes)
See more:
Write a program of tax calculation. Accept money as input from the user and calculate the tax using following pattern.

Money                 Percentage      Total Tax
Less than 10,000          5%              ?
10,000 to 100,000         8%              ?
More than 100,000        8.5%             ?
Posted
Updated 3-Nov-17 9:37am
v3
Comments
TrushnaK 18-Nov-13 4:54am    
So, Write down program. If you have any error or bug then ask.
tried out yourself.
Achyuth Guddeti 18-Nov-13 5:04am    
can you suggest me which method is easy way

This is your homework, hence you are expected to do it. Try yourself and if you need specific help then ask here.
 
Share this answer
 
Comments
Achyuth Guddeti 18-Nov-13 8:37am    
dude dat's not any homework.. its just a quetiion i found while surfing. i do not have a clue how to solve this
CPallini 18-Nov-13 8:40am    
Well, with a couple of if statements, you should easily solve it.
Achyuth Guddeti 20-Nov-13 2:44am    
Tanx bro, it did work
try this answer, this might do your work
using System;

class Program
{
    static void Main()
    {
       Console.Write("Input money : ");
       double money = double.Parse(Console.ReadLine());
       double tax;
       if (money < 10000)
       {
           tax = .05 * money;
       }
       else if (money <= 100000)
       {
           tax = .08 * money;
       }
       else
       {
           tax = .085 * money;
       }

       Console.WriteLine("Tax is {0:C}", tax);
       Console.ReadKey();
    }
}


[Agent_Spock]
- Added Code Brackets
 
Share this answer
 
v2

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900