write a program that calculate the volume of cylinder after
user enters radius and height and show the algorithm used



write a program that calculate the volume of cylinder after user enters radius and height and show ..

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

Post New Answer

More C++ Code Interview Questions

Seat Reservation prog for the theatre. Write a function for seat allocation for the movie tickets. Total no of seats available are 200. 20 in each row. Each row is referred by the Character, "A" for the first row and 'J' for the last. And each seat in a row is represented by the no. 1-20. So seat in diffrent rows would be represented as A1,A2....;B1,B2.....;........J1,J2... Each cell in the table represent either 0 or 1. 0 rep would seat is available , 1 would represent seat is reserved. Booking should start from the last row (J) to the first row(A). At the max 20 seats can be booked at a time. if seats are available, then print all the seat nos like "B2" i.e (2 row, 3 col) otherwise Print "Seats are not available." and we must book consecutive seats only.

1 Answers   Nagarro,


Code for Two Classes for Doing Gzip in Memory?

0 Answers  


Write a function- oriented to convert the input dollar(s) into its equivalent peso. Assume that one dollar is equivalent to 51.60

1 Answers  


readers and writers problem

1 Answers   Cognizant,


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

0 Answers   Nagarro,






write a program that can locate elements in array.

1 Answers  


create a stucture student containing field for roll no,class,year and marks.create 10 student annd store them in a file

0 Answers   HCL,


. Write a program using two-dimensional arrays that computes the sum of data in tows and the sum of data in columns of the 3x3 (three by three) array variable n[3][3].

2 Answers   IBM,


PROBLEM #8 The cashier at the counter of a Super Store, Mr. Khazaanchi has the following bundles of rupee cash notes with him: Rs. 1, 2, 5, 10, 50, 100, 500, 1000 A customer comes at his counter with various items that he has shopped. Mr. Khazaanchi totals the item prices and tells the customer his total amount payable. The customer gives Mr. Khazanchi some amount of cash. Find the total number of rupee notes of each denomination (i.e. 1, 2, 5, 10, 50, 100, 500, 1000) Mr. Khazaanchi will have to give to the withdrawer ensuring that the total number of rupee notes are minimum.

1 Answers   AR, ARJ,


Deriving time complexity of Binary tree and AVL tree, step by step.

4 Answers   NetApp,


Write a program that takes a 3 digit number n and finds out whether the number 2^n + 1 is prime, or if it is not prime find out its factors.

2 Answers   TCS,


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...

1 Answers  


Categories