0% found this document useful (0 votes)
17 views1 page

Week - 2 Assignments-1

The document outlines a Week 2 assignment consisting of six programming tasks. These tasks include performing arithmetic operations, calculating area and perimeter of a rectangle, printing ASCII values, calculating student marks, performing bitwise operations, and computing an employee's gross pay based on basic pay and allowances. Each task provides specific instructions and formulas to follow.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd
0% found this document useful (0 votes)
17 views1 page

Week - 2 Assignments-1

The document outlines a Week 2 assignment consisting of six programming tasks. These tasks include performing arithmetic operations, calculating area and perimeter of a rectangle, printing ASCII values, calculating student marks, performing bitwise operations, and computing an employee's gross pay based on basic pay and allowances. Each task provides specific instructions and formulas to follow.
Copyright
© © All Rights Reserved
We take content rights seriously. If you suspect this is your content, claim it here.
Available Formats
Download as PDF, TXT or read online on Scribd

Week 2 Assignment

Programs:

1. Write a program to take two numbers as input and perform subtraction, multipli-
cation, modulus and division on them.

2. Write a program that takes the length and breadth of a rectangle as input and
calculates its area and perimeter.
Hint: Area = length * breadth
Perimeter = 2 * (length + breadth)

3. Write a program to print the ASCII value of a character.

4. Write a program to accept student roll no, marks in 3 subjects and calculate total,
average of marks and print them with appropriate messages.

5. Write a program that takes two integer inputs and performs bitwise AND, OR, and
XOR operations on them, displaying the results.

6. An Employee’s Basic Pay (BP) is to be read through a keyboard. DA is 40%


of BP, HRA is 20% of BP, calculate the Gross Pay (GP) GP is computed as
BP+DA+HRA.

You might also like