Question

Write a C++ program to find the area of a shape whose area is given by...

Write a C++ program to find the area of a shape whose area is given by the formula Area = 2+4r + πr^6

Homework Answers

Answer #1

//importing the library
#include <iostream>
#include <math.h>
using namespace std;
 
int main() { 
 
 float r,Area=0; //initilization of the variable 
 
 cout<<"Enter the value of r : "<<endl;//taking input from the user 
 cin>>r;
 
  Area = 2+4*r + 3.14*pow(r, 6); // calculating the area of the shape 
  
  cout<<"Area of the shape :"<<Area; //here you will get output of the program 
return 0;
}
//end of the program

OUTPUT SCREEN IS :

value of r: 5

so,

Area : 49084.5

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 MATLAB program to find hypotenuses and Area of Triangle h^2+b^2=c^2 A = ½ b...
Write a MATLAB program to find hypotenuses and Area of Triangle h^2+b^2=c^2 A = ½ b h
Please write a program to calculate the area of a circle. Area =3.14*Radius*Radius. Input Radius. Please...
Please write a program to calculate the area of a circle. Area =3.14*Radius*Radius. Input Radius. Please write a program to calculate the area of a rectangle. Area =Width*Length. Input Width and Length. Please write a program to covert Fahrenheit degree to Celsius degree. The formula is C=(F-32)*5/9. Input Fahrenheit degree. Please write a program to covert Celsius degree to Fahrenheit degree. The formula is F=C*9/5+32. Input Celsius degree.
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 python program that calculates the area of triangle. The user will be asked to...
Write a python program that calculates the area of triangle. The user will be asked to enter the base (b) and the height (h). The formula to calculate the area is: Triangle_area=(bh)/2 Note: the program should print the area to the user: (for example: the area of the triangle is: 34.3)
This question is about the C program(NOT C++ program) Please write the C program to find...
This question is about the C program(NOT C++ program) Please write the C program to find out the largest and the smallest number in 32bits For example ,the smallest number in 32 bits is -2147483648
(C++) Write a program whose input is two characters and a string, and whose output indicates...
(C++) Write a program whose input is two characters and a string, and whose output indicates the number of times each character appears in the string. Ex: If the input is: n M Monday the output is: 1 1 Ex: If the input is: z y Today is Monday the output is: 0 2 Ex: If the input is: n y It's a sunny day the output is: 2 2 Case matters. Ex: If the input is: n N Nobody...
Write java program to print the following shape N lines. * * * * * *...
Write java program to print the following shape N lines. * * * * * * * * * * * * * * * * * * * * * Input: N Output: The printed shape
Write a program to find all the numbers divisible by 7 between a given range of...
Write a program to find all the numbers divisible by 7 between a given range of numbers [n1, n2] entered by the user using a FOR loop only. write C program. help
write the first 4 terms of the sequence whose nth term is given by the formula:...
write the first 4 terms of the sequence whose nth term is given by the formula: an= n− 2/n
Given an integer named area which represents the area of a rectangle, write a function minPerimeter...
Given an integer named area which represents the area of a rectangle, write a function minPerimeter that calculates the minimum possible perimeter of the given rectangle, and prints the perimeter and the side lengths needed to achieve that minimum. The length of the sides of the rectangle are integer numbers. For example, given the integer area = 30, possible perimeters and side-lengths are: (1, 30), with a perimeter of 62 (2, 15), with a perimeter of 34 (3, 10), with...
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT