write a program that calculate the volume of cylinder after
user enters radius and height and show the algorithm used
Answer Posted / evangelist sammy gicheha
# include<iostream.h>
//using namespace std;
# define PI 3.142;
int main ()
{
int Rad,Height;
double area;
cout<<"Enter the radius;";
cin>>Rad;
cout<<"Enter the Height;";
cin>>Height;
area = 3.142 * Rad * Rad * Height;
cout<<"Radius="<<Rad<<endl;
cout<<"Height="<<Height<<endl;
cout<<"The Area of the circle is"<<area<<"\n";
return 0;
}
| Is This Answer Correct ? | 5 Yes | 4 No |
Post New Answer View All Answers
What output does the following code generate? Why? What output does it generate if you make A::Foo() a pure virtual function? class A { A() { this->Foo(); } virtual void Foo() { cout << "A::Foo()" << endl; } }; class B : public A { B() { this->Foo(); } virtual void Foo() { cout << "A::Foo()" << endl; } }; int main(int, char**) { A objectA; B objectB; return 0; }
How can I Draw an ellipse in 3d space and color it by using graph3d?
solve the problem in the programming language C++"if a five digit number is input through the keyboard.Write a program to calculate the sum of its digits(hint: use the modulus operator)
A suduco given & u hv 2 check if it is incomplete(blanks left),or correct or incorrect
write a program using virtual function to find the transposing of a square matrix?
can you please write a program for deadlock that can detect deadlock and to prevent deadlock.
Given a table of the form: Product Sold on A 1/1/1980 B 1/1/1980 C 1/1/1980 A 1/1/1980 B 1/1/1980 C 2/1/1980 A 2/1/1980 There are 30 products and 10,000 records of such type. Also the month period during which sales happened is given to u. Write the program to display the result as: Product Month No. of copies A January 12 A February 15 A March 27 B January 54 B February 15 B March 10 C January 37
i really need help about this.. write a program to display the set of odd and even numbers separately. find the highest and lowest value of the given numbers.
Performance Algorithm A performs 10n2 basic operations and algorithm B performs 300 lg n basic operations. For what value of n does algorithm B start to show its better performance?
write a program to calculate the amount of investment after a period n years if the principal investors was p and interest is calculated using compound interest,formular=a=p(1+r)^n
What output does this program generate as shown? Why? class A { A() { cout << "A::A()" << endl; } ~A() { cout << "A::~A()" << endl; throw "A::exception"; } }; class B { B() { cout << "B::B()" << endl; throw "B::exception"; } ~B() { cout << "B::~B()"; } }; int main(int, char**) { try { cout << "Entering try...catch block" << endl; A objectA; B objectB; cout << "Exiting try...catch block" << endl; } catch (char* ex) { cout << ex << endl; } return 0; }
how to write a program that opens a file and display in reverse order?
write a program to convert temperature from fa height into celcius and vise versa,use modular programming
Create a program to read two random data set in two files named data1.txt and data2.txt manifold contains integer numbers, whereas data2.txt file contains the float type numbers. Simpanlahmasing each into 2 pieces of data that is an array of type integer array and an array of type float, then calculate the average numbers in the second array.
create a stucture student containing field for roll no,class,year and marks.create 10 student annd store them in a file