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....
Please use C++ programming language write a program to convert temperature in Fahrenheit to temperature in...
Please use C++ programming language write a program to convert temperature in Fahrenheit to temperature in celcius.( no comments necessary). get the temperature in Fahrenheit. calculate the temperature in Celsius. and write  the output to screen. Celsius = (5/9) * (F-160)
In Java The Circle. In one program, write 3 separate functions, and use them. Calculate area...
In Java The Circle. In one program, write 3 separate functions, and use them. Calculate area of circle, parameter radius. Use math lib ‘pow’ function to help with calc: calcArea Calculate diameter of circle, parameter radius: calcDiameter Calculate circumference of circle, parameter radius:calcCircumference Test radius sizes: 5, 42, 12.30
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)
Write the code to solve the following problem. Create a program that calculates the area of...
Write the code to solve the following problem. Create a program that calculates the area of ​​a rectangle. The user enters the length and width values.The program will collect the values, make the calculation and display the result. Include comments on each line documenting the purpose of each statement. In C ++ language Please.
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);...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT