Program of multipication using inline function, C/C++ Programming

Aim: Write a program of multipication using inline function

class Multiply

{

          int x,y;

          public:

          void getdata();

          inline calculate(int a,int b)

          {

                   return(a*b);

          }

          void display();

};

void Multiply::getdata()

{

          cout<<"Enter the two numbers"<

          cin>>x>>y;

}

void Multiply::display()

{

          cout<<"Multiplication of "<Output:

 

Enter the two numbers

6 5

Multiplication of 6 and 5=30

 

 

Posted Date: 9/29/2012 4:23:37 AM | Location : United States







Related Discussions:- Program of multipication using inline function, Assignment Help, Ask Question on Program of multipication using inline function, Get Answer, Expert's Help, Program of multipication using inline function Discussions

Write discussion on Program of multipication using inline function
Your posts are moderated
Related Questions

Unions A union is also like a structure, except that only single variable in the union is stored in the allocated memory at a time. It is a collection of mutually exclusive var

c program to construct a structure: struct sensus                 {                                 char name[30];                                 long int population;

in this problem you are given a board in which some of the elements are placed..each element represent ancolor.fill the other elements in the board such that none of the adjacent e

Asks the user for an integer. if the number is less than 21, ask them for a number again; repeat this until you get a number bigger than 20. 20 is not an acceptable number. Once yo

I am having trouble declaring a variable and returning a value from my function.


Inheritance is the process of forming new classes, called derived classes, from existing classes or base classes. The derived class inherits all the capabilities of the base class,

Ask question #write statement that assign random integer to the varaible n in the (100

Define Generic Bitwise Operations? Bitwise operators only work on an incomplete number of types int and char. It turns out there's above one kind of int. In particular there's