Question

Please write a program to calculate the area of a circle. Area =3.14*Radius*Radius. Input Radius. Please...

  1. Please write a program to calculate the area of a circle. Area =3.14*Radius*Radius. Input Radius.
  2. Please write a program to calculate the area of a rectangle. Area =Width*Length. Input Width and Length.
  3. Please write a program to covert Fahrenheit degree to Celsius degree. The formula is

C=(F-32)*5/9. Input Fahrenheit degree.

  1. Please write a program to covert Celsius degree to Fahrenheit degree. The formula is F=C*9/5+32. Input Celsius degree.

Homework Answers

Answer #1

//AREA OF CIRCLE

#include <stdio.h>
#include <math.h>


int main()
{
float radius, area;

printf("Enter the radius of a circle\n");

scanf("%f", &radius);

area = 3.14*radius*radius;

printf("Area of the circle = %.2f\n", area);

return 0;
}

// AREA OF RECTANGLE

#include<stdio.h>
#include<conio.h>

int main() {
   int length, width, area;

   printf("\nEnter the Length of Rectangle : ");
   scanf("%d", &length);

   printf("\nEnter the Widthof Rectangle : ");
   scanf("%d", &width);

   area = length * width;
   printf("\nArea of Rectangle : %d", area);

   return (0);
}

// Celsius to Fahrenheit

#include <stdio.h>

int main()
{
    float celsius, fahrenheit;


    printf("Enter temperature in Celsius: ");
    scanf("%f", &celsius);


    fahrenheit = (celsius * 9 / 5) + 32;

    printf("%.2f Celsius = %.2f Fahrenheit", celsius, fahrenheit);

    return 0;
}

// Fahrenheit to Celsius

#include<stdio.h>

int main()
{
    float fahrenheit, celsius ;

    printf("Enter a temp in fahrenheit: ");
    scanf("%f", &fahrenheit);

    celsius = (fahrenheit- 32)*(5.0/9);

    printf("%.2f°F is same as %.2f°C", fahrenheit, celsius );

    return 0;
}

Know the answer?
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Not the answer you're looking for?
Ask your own homework help question
Similar Questions
Write a Python program to calculate the area of a circle. The user needs to input...
Write a Python program to calculate the area of a circle. The user needs to input the value of the radius of the circle. area = 3.14 x radius x radius You should use a function named circlearea to perform the calculation 3. Write a Python program to calculate the area of a square. The user needs to input the value of the length of the square. area = len*len You should use a function named squarearea to perform the...
Program must be in JAVA. Write a program that converts temperature from Celsius to Fahrenheit or...
Program must be in JAVA. Write a program that converts temperature from Celsius to Fahrenheit or vice versa, depending on user's input. The formula for converting temperature in Celsius to Fahrenheit is, Fahrenheit = (9/5) * Celsius + 32 The formula for converting temperature in Fahrenheit to Celsius is, Celsius = (5/9) * (Fahrenheit – 32) Results should be rounded to two decimal points, e.g., 92.56
In C programming, Thank you Write a program to compute the area of a circle. You...
In C programming, Thank you Write a program to compute the area of a circle. You have to write a complete “C” program that compiles and runs in Codeblocks. Program requirements: 1. Declare the variables needed: radius (r) and area (yourLastName). 2. Calculate and print the area of each circle. 3. The program MUST prompt the user for a new radius (r) over and over until the user types -1. 5. Use the type double for all decimal numbers. 6....
Write a program that requests an input (P for perimeter and A for area) then asks...
Write a program that requests an input (P for perimeter and A for area) then asks the user for the dimensions (length & width) of a rectangular pool. The program computes and displays either the perimeter or the area of the pool.
C++ Program: Prompt the user to enter a Fahrenheit degree then using the following formula to...
C++ Program: Prompt the user to enter a Fahrenheit degree then using the following formula to convert it to Celsius degree. Don't accept any value less than -60 and more than 200. C = (5/9)*(F – 32)
ALL IN PYTHON PLEASE Problem 4 Write a program to compute the area of a circle...
ALL IN PYTHON PLEASE Problem 4 Write a program to compute the area of a circle some 'n' times. You must accept n and r from the user. Area is calculated using (22/7.0)*r*r - where r is the radius. Implement using value-returning functions. Hint: create a function to calculate area taking r as a parameter. In the main() function, ask for n and create a loop where you input r and invoke the area function n times. Rubric: Correct use...
Complete the program to calculate and print the circumference and area of a circle, rounded to...
Complete the program to calculate and print the circumference and area of a circle, rounded to the nearest tenth (1 decimal place). The starter code already prompts the user and takes in the radius as a double-value input. You need to do the calculations and print the results. I recommend using the printf() command (described in chapter 3 of the book) to print the results with the correct rounding. import java.util.Scanner; class Circle { static Scanner sc = new Scanner(System.in);...
C language Create the following programs: Program to solve for Area of Rectangle Variable inputs for...
C language Create the following programs: Program to solve for Area of Rectangle Variable inputs for length and width of integer data type Variable output for area of integer data type Program to find Area of Circle variable array with 10 inputs from 3-30 by steps of 3 variable array with 10 solutions for Area of Circle of float data type Program to solve for any angle with inputs of x and y using the standard Cartesian coordinate system Use...
Write a PYTHON program that takes the radius of a sphere (a floating-point number) as input...
Write a PYTHON program that takes the radius of a sphere (a floating-point number) as input and then outputs the sphere’s surface area. The Surface Area of a Sphere is Surface Area = 4πr² Surface Area = 4 * PI * radius * radius
C++ Fahrenheit to Celsius Tables Write a program that first asks the user which Temperature scale...
C++ Fahrenheit to Celsius Tables Write a program that first asks the user which Temperature scale conversion he/she would like to perform: 1. Convert F to C 2. Convert C to F 3. Quit What is your choice? Then it asks the user for input for three real number variables: start_temp, end_temp, temp_incr. It will then produce a two column Fahrenheit to Celsius table or a two column Celsius to Fahrenheit table, depending on the choice. For choice 1, the...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT