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


Please Help Members By Posting Answers For Below Questions

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.

1978


1+1/2!+1/3!+...+1/n!

1952


Write a C++ program without using any loop (if, for, while etc) to print prime numbers from 1 to 100 and 100 to 1 (Do not use 200 print statements!!!)

3282


Definition of priority queue was given. We have to implement the priority queue using array of pointers with the priorities given in the range 1..n. The array could be accessed using the variable top. The list corresponding to the array elements contains the items having the priority as the array index. Adding an item would require changing the value of top if it has higher priority than top. Extracting an item would require deleting the first element from the corresponding queue. The following class was given: class PriorityQueue { int *Data[100]; int top; public: void put(int item, int priority); // inserts the item with the given priority. int get(int priority); // extract the element with the given priority. int count(); // returns the total elements in the priority queue. int isEmpty(); // check whether the priority queue is empty or not. }; We had to implement all these class functions.

4406


We need to write the function to check the password entered is correct or not based on the following conditions.. a) It must have atleast one lower case character and one digit. b)It must not have any Upper case characters and any special characters c) length should be b/w 5-12. d) It should not have any same immediate patterns like abcanan1 : not acceptable coz of an an pattern abc11se: not acceptable, coz of pattern 11 123sd123 : acceptable, as not immediate pattern adfasdsdf : not acceptable, as no digits Aasdfasd12: not acceptable, as have uppercase character

3966






Write a C/C++ program that connects to a MySQL server and checks if the InnoDB plug-in is installed on it. If so, your program should print the total number of disk writes by MySQL.

2075


write a program that reverses the input number of n.Formulate an equation to come up with the answer.

7056


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

2378


Ask the user to input three positive integers M, N and q. Make the 2 dimensional array of integers with size MxN, where all the elements of I (I = 1,…,M) line will be members of geometrical progression with first element equal to the number of line (I) and denominator q.

3403


How to swap two ASCII numbers?

2460


write a program to perform generic sort in arrays?

2638


Code for Small C++ Class to Transform Any Static Control into a Hyperlink Control?

2569


write a program using 2 D that searches a number and display the number of items 12 inputs values input 15,20, 13, 30, 38, 40,16, 18, 20 ,18 ,20 enter no. to search : 20

3372


Code for Method of Handling Factorials of Any Size?

2014


write a program that can LOCATE and INSERT elements in array using c++ programming languages.

3453