Assignment2

Assignment2 - Department of Computer Science The University...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Department of Computer Science The University of Hong Kong CSIS1117A Computer Programming Assignment 2 Due Date: 23:59 Oct 9, 2009. You may assume all input are valid in these exercises. 1. The Government of Green Island is charging tax according to the follow table. Income Tax Rate First $100,000 Tax free Next $50,000 10% Next $100,000 20% Remaining 30% A flat rate of 20% is imposed on the tax, so that if the tax payable according to the above table is higher than 20% of total income, the tax payable will be 20% of total income. Write a program (tax.cpp) to find the tax payable given the total income. Assume that the input is a positive real number. And output the tax payable to the nearest integer. Sample run of the program: Sample Run 1: Enter total income: 360000 Tax payable is 58000. Sample Run 2: Enter total income: 80000 Tax payable is 0. Sample Run 3: Enter total income: 600000 Tax payable is 120000. 2.
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This document was uploaded on 05/04/2011.

Page1 / 2

Assignment2 - Department of Computer Science The University...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online