google.com, pub-4617457846989927, DIRECT, f08c47fec0942fa0 Learn to enjoy every minute of your life.Only I can change my life.: Write a c++ program using class to calculate cube and square of a given number using inline function.

Saturday, February 28, 2015

Write a c++ program using class to calculate cube and square of a given number using inline function.

Write a c++ program using class to calculate cube and square of a given number using inline function.

#include<iostream.h>
#include<conio.h>
class calc
{
int no;
public:inline void number()
       {
       int square,cube;
       cout<<"Enter the number";
       cin>>no;
       square=no*no;
       cube=no*no*no;
       cout<<"Square of a given number is:-"<<square;
       cout<<"\n Cube of a given number is:-"<<cube;
       }
       };
int main()
{
calc c;
clrscr();
c.number();
getch();
return 0;
}

======================================================
OUTPUT:-
Enter the number5
Square of a given number is:-25
Cube of a given number is:-125

रामायण

रामायण दशरथ की तीन पत्नियाँ – कौशल्या, सुमित्रा , कैकेयी दशरथ के चार पुत्र – राम,लक्ष्मण,भरत,शत्रुघ्न दशरथ: राम के पिता और कौशल के राजा कौशल...