Question: a Lab Exercises 1. Write a program to accept a number and display the all natural numbers below that number. (Hint: If you enter 3,
a Lab Exercises 1. Write a program to accept a number and display the all natural numbers below that number. (Hint: If you enter 3, result is :1-2-3-4-5=15) 2. Write a program to find the factorial of a given number (Hint: if you enter 5, Result: 120). 3. Write a program to accept a number and display all prime numbers below that number. (Hint : If you enter 10. Result should be :2, 3,5,7) 4. Write a program to accept a number and display the multiplication table of that number. 5. The two temperature scales used in the United States are Celsius and Fahrenheit. The mathematical relationship between the two scales is: 5 C=(F - 32) Write two functions, fToC and cToF, which convert temperatures from one scale to another. For example, a call offToC will return the equivalent Celsius temperature for a given Fahrenheit temperature. Celsius = f[oC (100); // Celsius now stores 37.8 6. Write a function which takes in the radius of a sphere and calculate its area and its volume. The formula is: Sphere Surface Area A = 41 r2 Volume
Step by Step Solution
There are 3 Steps involved in it
Get step-by-step solutions from verified subject matter experts
