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

Programming Challenges for Beginners

The document outlines 5 problems that require computer programs to solve: 1) calculating employee pay including basic pay, allowances, deductions, 2) calculating total money saved in a piggy bank with coins of different values, 3) calculating the surface area of a prism given its side lengths, 4) calculating the speed of a plane given distance and time, 5) calculating the sum of the first n natural numbers using the formula n(n+1)/2.

Uploaded by

LEKHAN CHIRIKI
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)
72 views1 page

Programming Challenges for Beginners

The document outlines 5 problems that require computer programs to solve: 1) calculating employee pay including basic pay, allowances, deductions, 2) calculating total money saved in a piggy bank with coins of different values, 3) calculating the surface area of a prism given its side lengths, 4) calculating the speed of a plane given distance and time, 5) calculating the sum of the first n natural numbers using the formula n(n+1)/2.

Uploaded by

LEKHAN CHIRIKI
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

1. ABC company Ltd.

is interested to computerize the pay calculation of their employee


in the form of Basic Pay, Dearness Allowance (DA) and House Rent Allowance
(HRA). DA and HRA are calculated as certain % of Basic pay (For example, DA is
80% of Basic Pay, and HRA is 30% of Basic pay). They have the deduction in the
salary as PF which is 12% of Basic pay. Propose a computerized solution for the
above said problem.

2. Little John saves 50 coins in a piggy bank. The coins are collection of 25, 20, 10 and
5 Pais coins in the piggy bank. He has opened the piggy bank today, write a program
to determine the total money saved by him.

3. Surface area of a prism can be calculated if the lengths of the three sides are known.
Write a program that takes the sides as input (read it as integer) and prints the surface
area of the prism (Surface Area = 2ab + 2bc + 2ca).

4. A plane travels 395,000 meters in 9000 seconds. Write a program to find the speed
of the plane (Speed = Distance / Time).

5. Write a program to find the sum of the first ‘n’ natural numbers, where the value of n
is provided by the user. Sum of ‘n’ numbers = n*(n+1)/2.

You might also like