Thanks to visit codestin.com
Credit goes to www.scribd.com

0% found this document useful (0 votes)
8 views2 pages

Lab 4 (Condition)

The document outlines six programming tasks in C#. These tasks include checking for multiples of 2 or 5, classifying integers based on specific criteria, determining age categories, comparing two numbers, calculating tax based on income brackets, and assigning letter grades based on numerical scores. Each task provides specific requirements and conditions for the implementation.

Uploaded by

sohanxt
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
8 views2 pages

Lab 4 (Condition)

The document outlines six programming tasks in C#. These tasks include checking for multiples of 2 or 5, classifying integers based on specific criteria, determining age categories, comparing two numbers, calculating tax based on income brackets, and assigning letter grades based on numerical scores. Each task provides specific requirements and conditions for the implementation.

Uploaded by

sohanxt
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as DOCX, PDF, TXT or read online on Scribd
You are on page 1/ 2

1.

Write a c# program that reads an integer as input from


the user, and prints the integer if it is a multiple of 2 OR
5 and prints "Not a multiple of 2 OR 5" otherwise.

2. Write a program that reads an integer, and prints the


integer if it is a multiple of either 2 or 5 but not both. If
the number is a multiple of 2 and 5 both, then print
"Multiple of 2 and 5 both". For all other numbers, the
program prints "Not a multiple we want".

3. Write a program that takes the age of a person as input


and classifies them as infant, child, teenager, adult, or
senior based on the following criteria:
● Infant: 0 - 2 years
● Child: 3 - 12 years
● Teenager: 13 - 19 years
● Adult: 20 - 64 years
● Senior: 65 years and above

4. Create a program that takes two numbers as input and


determines which one is greater, or if they are equal.

5. Write a program that takes the income of a person as


input and calculates the tax amount based on the
following tax brackets:
● Income ≤ $10,000: 5% tax

● $10,001 - $20,000: 10% tax


● $20,001 - $50,000: 15% tax
● Income > $50,000: 20% tax
6. Develop a program that takes a numerical grade as input
and assigns a letter grade based on the following scale:
● A: 90-100
● B: 80-89
● C: 70-79
● D: 60-69
● F: Below 60

You might also like