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
I really have a hard time analyzing how to write a code in C. It''s all bout Time Departure and we must used a 24 hour clock. Can u help me?

Define Array of Structures? An Array of Structures is an assortment of the same data types which are declared as structures. It is useful to store large and different number of

How do one throw polymorphically?               A: Sometimes people write code such as: class MyExceptionBase { }; class MyExceptionDerived : public MyExceptionBase { };

You are setting up an information system for a DVD Rental Company called Box office. The new system need to hold information about customers and DVDs rentals, payments and fines. C

SquareMaze The SquareMaze class should be declared and defined in maze.h and maze.cpp, respectively. Each SquareMaze object will represent a randomly-generated square maze and its

This problem familiarizes you with using random numbers in C++. The program is to compute a good approximation of π using a simulation method called "Monte Carlo". The following fi

This task involves char arrays and pointer based string handling. Which we use to make a simple encryption program, using a Caesar Cipher, Write a program that: a. Asks

depth description of the inside and outside typecasting

Aim: To implement a program to add two complex numbers using constructors. Code:                       class complex {             int real;             int img;

What are all of the implicit member functions of the class? Or what are all of the functions that compiler implements for us if we don't describe one? A: 1.      copy ctor