write a program that calculate the volume of cylinder after
user enters radius and height and show the algorithm used
Answer / 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 |
what is virtual constroctor ? give an exam for it?-(parimal dhimmar)
Write a program to enter 10 number of integer entries into an array n and then odds up all the odd entries. the program then displays the result. plssss answer assss fast asss u can...
write a function -oriented program that generates the Fibonacci, the current numbers of n(as input) and display them (series). In Fibonacci, the current third number is the sum of the previous number.
Algorithm in O(2n) Presently we can solve in our hypothetical machine problem instances of size 100 in 1 minute using algorithm A, which is a O(2n). We would like to solve instances of size 200 in 1 minute using algorithm A on a new machine. What is the speed of the new machine should be?
2 Answers ABC, Qatar University,
Show by induction that 2n > n2, for all n > 4.
2 Answers Karvy, Qatar University,
1. Write a program using one dimensional array that calculates the sum and average of the five input values from the keyboard and prints the calculated sum and average.
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; }
write a program that reverses the input number of n.Formulate an equation to come up with the answer.
write a function that reverse the elements of an array in place.The function must accept only one pointer value and return void.
main(){int a=5,b 10,c=2, d;a=b c;d=++a=(--c)*2; printf("%d%d%d%d,a,b,c,d; return o;}
what is the difference between int &r and int& r
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.