Friday, 23 January 2015

Multiplication of two values using Inline function in c++

//Multiplication of two values using Inline function.

#include<iostream.h>
#include<conio.h>
class Line
{
public:
inline float mult(float x,float y)
{
return(x*y);
}
       };
void main()
{
 clrscr();
 Line obj;
 float val1,val2;
  cout<<"Enter two values for its Multiplication\n";
  cout<<"a= ";
  cin>>val1;
  cout<<"\nb= ";
  cin>>val2;
  cout<<"Multiplication of a and b is "<<obj.mult(val1,val2);
  getch();
 }

No comments:

Post a Comment

Read contacts in iOS using Swift with error handling

Just copy and paste the below code Pre-step before pasting the below code Add below line in AppDelegate.swift file below import statement ...