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
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)
(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
using C++ 1) write a program to calculate to avg of N number of subjects. 2)write...
using C++ 1) write a program to calculate to avg of N number of subjects. 2)write a program to find the factorial of 5! 5*4*3*2*1 3)write a program to display the multiplication table for any number please enter number : 3 1*3=3 2*3=6 2*4= 10*3=30 4) find the factorial on n
write a C program to find whether the given number of three digits is an integer...
write a C program to find whether the given number of three digits is an integer such that the sum of the cubes of its digits is equal to the number itself. For example, 371 is since 3**3 + 7**3 + 1**3 = 371. Output: Enter a number, or -999 to quit : 432 4**3 + 3**3 + 2**3 is not = 432 Enter a number, or -999 to quit : 371 3**3 + 7**3 + 1**3 is = 371...
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...
Write a program in C that extracts the tokens from a string. Given a string as...
Write a program in C that extracts the tokens from a string. Given a string as input, the program should print on the screen each token on a new line. For example given the following string as input: “hello there my friends” the program should generate: I am a programmer
ADVERTISEMENT
Need Online Homework Help?

Get Answers For Free
Most questions answered within 1 hours.

Ask a Question
ADVERTISEMENT