Count the volume of a cone with pointer in c++

code for counting the volume of a cone with pointer in c++
#include <conio.h>
#include <iostream.h>
#include <math.h>
void main(){

    int *r=new int;
   int *t=new int;
   int *v=new int;
   int *lp=new int;
   int *ls=new int;
   int *s=new int;

   cout<<" APLIKASI PENGHITUNG VOLUME DAN LUAS KERUCUT\n";
   cout<<" ===========================================\n";
   cout<<" Jari - jari Kerucut      : ";cin>>*r;
   cout<<" Tinggi Kerucut           : ";cin>>*t;
   *v=(3.14* *r * *r * *t)/3;

   cout<<"\n Volume kerucut           : "<<*v;
   *s =  sqrt((*r * *r) + (*t * *t));
   *ls = (3.14 * *r * *s);
   cout<<"\n Luas Selimut kerucut     : "<<*ls;
   *lp = (*ls + (3.14* *r * *r));
   cout<<"\n Luas Permukaan kerucut   : "<<*lp;
   getch();
   delete r,t,v,lp,ls,s;
   }

in indonesian, its called by "Menghitung luas kerucut". hehehee
Previous
Next Post »