Professional Documents
Culture Documents
Programs
Programs
1. Let R be the radius of a circle. Prepare a shell to execute Area and Perimeter of a circle?
2. Write a program file to execute cube root, fourth root, fifth root and Sixth root for a given
value.
3. Write a function and script file quadratic which accepts three values as the coefficients a,
b and c of quadratic equation, computes and returns the value of the corresponding roots
as x1 and x2.
Equation: 𝑎𝑥2+ 𝑏𝑥 + 𝑐
4. As of early 2018, Usain Bolt holds the world record in the men's 100-meter dash. It is
9.58 seconds. What was his average speed in km/h? Assign the result to a variable called
hundred.
5. Kenyan Eliud Kipchoge set a new world record for men of 2:01:39 on September 16,
2018. Assign his average speed in km/h to the variable marathon. The marathon distance
is 42.195 kilometers.
6. The program takes in the marks of 5 subjects and displays the grade and total marks.
7. Write a program to find smallest and biggest number out of given 3 numbers.
8. Write a program to check whether the given number is in between 1 and 100
9. Write a program which calculates the tip in the restaurant according to the amount of the
bill, if the bill is less than 10$ the tip is $1.80. If the bill is between $10 and $60 the tip is
18% of the bill, if the bill is above $60 the tip is 20% of the bill.
logic: 42.195/((121*60)+39);