Write a COMPLETE and an EFFICIENT C program that should ask the user to enter one of the following four choices: 1. To convert Centigrade temperature to Fahrenheit temperature 2. To check whether any positive integer in the range from 71 to 971 is prime or not? 3. To check whether an integer, in the range 100 to 999, is Armstrong number or not? 4. Exit After having the choice from the user, implement the following tasks using SWITCH statement. For choice (1), your code should take the temperature value in o C from the user, and display the result in o F with proper format. Formula: Fo = Co x(9/5)+32. For choice (2), your code should ask the user to enter a positive integer from 71 to 971. No need of validation. Store it in variable n. Your code should display whether the entered number is prime or not? For choice (3), your code should ask the user to enter any positive integer from 100 to 999. On having the input, your code should display whether the given number is Armstrong or not? Note: An Armstrong number of three digits is an integer such that the sum of the cubes of its digits is equal to the number itself.
0 Comments