Friday 12 May 2023

Questions

 Exercise 1

Set A . Apply all the three program development steps for the following examples.

 1. Accept dimensions of a cylinder and print the surface area and volume (Hint: surface area =
2pr2 + 2prh, volume = pr2h)


2. Accept temperatures in Fahrenheit (F) and print it in Celsius(C) and Kelvin (K) (Hint: C=5/9(F-
32), K = C + 273.15)

 3. Accept initial velocity (u), acceleration (a) and time (t). Print the final velocity (v) and the
distance (s) travelled. (Hint: v = u + at, s = u + at2)

 4. Accept inner and outer radius of a ring and print the perimeter and area of the ring (Hint:
perimeter = 2 p (a+b) , area = p (a2-b2) )

 5. Accept two numbers and print arithmetic and harmonic mean of the two numbers (Hint: AM=
(a+b)/2 , HM = ab/(a+b) )

 6. Accept three dimensions length (l), breadth(b) and height(h) of a cuboid and print surface
area and volume (Hint : surface area=2(lb+lh+bh ), volume = lbh )

 7. Accept a character from the keyboard and display its previous and next character in order.
Ex. If the character entered is ‘d’, display “The previous character is c”, “The next character is e”.

 8. Accept a character from the user and display its ASCII value.

Questions

  Exercise 1 Set A . Apply all the three program development steps for the following examples.  1. Accept dimensions of a cylinder and p...