Follow us on FB

Thursday, May 30, 2013

Operator overloading . adding angle and radius ( polar)

#include<iostream>#include<math.h>using namespace std;class polar{    private:        float radius;        float angle;    public:        float getx()        {            return radius*cos(angle);        }        float gety()        {            return radius*sin(angle);        }        polar()        {            radius=0;            angle=0;        }        polar(float...

mind guess game (interesting) in dev c++

#include<iostream> #include<conio.h> #include<string> #include<ctime> #include<cstdlib> using namespace std; int main(){ srand(time(0)); float g,r,l; char op; cout<<"\t\t.....M Haseeb Jaffur......."<<endl; cout<<endl<<"Note:   'y' for next step and 'any no ' for exit game\t"<<endl; cout<<"\nthink rupees (2 to 100) in your mind "<<endl; cout<<"\t enter 'y' for next step: "; cin>>op; if(op=='y'||...

 

Copyright @ 2013 placeoflearn.