Header Ads Widget

Ticker

6/recent/ticker-posts

Addition Of Two Number Using Class In C-Language - Digitalise Data

 

"Digitalise Data","Class in c++"

This Program Is Helps To Add To Number Using Class In C++ Language


_____________________________________________________
#include<iostream.h>
#include<conio.h>
class Mathematics
{
  int x, y;

  public:
  void input()
   {
    cout << "Input two integers\n";
    cin >> x >> y;
   }
   void add()
    {
    cout << "Addition: " << x + y;
    }
};
void main()
{
   Mathematics m; // Creating an object of the class

   m.input();
   m.add();
   getch();
}
_____________________________________________________

Run This Program Using Turbo C++ in Pc Or TurboCdroid in Android It Will Work


#DigitaliseData
#C++Programing


Post a Comment

0 Comments