
Concept explainers
3. In the C

C program:
#include <stdio.h>
#define PI 3.14
int main()
{
float radius, SurfaceArea, Area;
// input the radius of a sphere
printf("Enter the radius of a Sphere: ");
scanf("%f", &radius);
// calculate surface area of the sphere
SurfaceArea = 4 * PI * radius * radius;
// display the surface area of the sphere
printf("\nThe Surface area of a Sphere = %.2f", SurfaceArea);
// calculate the area of a circle having the same radius
Area = PI * radius * radius;
// display the area of circle
printf("\nThe Area of a Circle = %.2f", Area);
return 0;
}
Trending nowThis is a popular solution!
Step by stepSolved in 2 steps with 2 images

- python Write an expression whose value is the string that consists of the second through fifth characters of string s.arrow_forwardvisual Basicarrow_forwardDevelop a pseudocode or flowchart for all the following problems : 1. Write a program which will display “I AM GOOD” on the computer screen for 10x2. Write a program which will display “I AM GREAT” on the computer screen for 100x3. Write a program which will display “I AM SUPERMAN” on the computer screen for 1000x4. Accept two integers from computer user and check whether they are equal or not.5. Write a program to check whether a given number is even or odd.6. Write a program to check whether a given number is positive or negative7. Write a program to read the value of an integer m and display the value of n is 1 when m is larger than 0, 0when m is 0 and -1 when m is less than 08. Write a program which accept the user’s height in cm then display :a. You are so tall → if the height is more than 180cmb. You are not that tall → if the height is between 100 – 179cmc. You are short ha ha ha → if the height is less than 100cm9. Write a program to read 10 numbers from keyboard and find their…arrow_forward
- 1. Write a program to obtain answer by entering a Quadratic function from the user.(using visual studio) output screen Enter the coefficient for the Quadratic term : 00 Enter the coefficient for the linear term : 00 Enter the coefficient for the Constant term : 00 entered Quadratic function y = 00x^2 + 00x + 00 answer is 00, 00arrow_forward3. Write a complete C language program to display the area of the shaded region. The dimensions must be taken from the user. Height Width y 9. Write a complete C language program to display the area of the shaded region. The dimensions must be taken from the user. Assume that the white area is a perfect circle. Assume that the radius of the circle will be a REAL NUMBER. Height Width 10. Write a seperate C language program to evaluate each of the following equations. Users should he able te input x and z from the keyboard. The formulas are defined for real numbers.arrow_forwardPlease do it on Visual Studios using Python. (Use version Python3)arrow_forward
- Database System ConceptsComputer ScienceISBN:9780078022159Author:Abraham Silberschatz Professor, Henry F. Korth, S. SudarshanPublisher:McGraw-Hill EducationStarting Out with Python (4th Edition)Computer ScienceISBN:9780134444321Author:Tony GaddisPublisher:PEARSONDigital Fundamentals (11th Edition)Computer ScienceISBN:9780132737968Author:Thomas L. FloydPublisher:PEARSON
- C How to Program (8th Edition)Computer ScienceISBN:9780133976892Author:Paul J. Deitel, Harvey DeitelPublisher:PEARSONDatabase Systems: Design, Implementation, & Manag...Computer ScienceISBN:9781337627900Author:Carlos Coronel, Steven MorrisPublisher:Cengage LearningProgrammable Logic ControllersComputer ScienceISBN:9780073373843Author:Frank D. PetruzellaPublisher:McGraw-Hill Education





