Friday, 22 September 2017

PRACTICAL-2

PRACTICAL-2
Aim of the practical:-
Write a program (WAP) to calculate volume of a cone, sphere and cylinder.

Header files used:-
#include <iostream.h>
#include <stdlib.h>
#include <math.h>
Formulas used:-
i.                Volume of a circular cone = (1/3)πr2h.
ii.              Volume of a cylinder = πr2h
iii.           Volume of a sphere = (4/3)πr3
Procedures followed:-
The user will be asked to enter the radius or radius and height in successive instances in the program using different cout statements. Different formulas will be used to find the volume of cone, cylinder and sphere respectively. While using the formula the function pow() will be used to find the square or cube of any value. The header file math.h will also be used which contains the definition of pow() function.

Coding:-

4 comments:

  1. Sir coding matlab boh programing likhna hai to

    ReplyDelete
  2. हाँ प्रोग्राम को लिखो उस SECTION में ।

    ReplyDelete
  3. Sir plz upload practical no 1 for me ..

    ReplyDelete