Docstoc

SUM

Document Sample
SUM Powered By Docstoc
					#include<iostream.h>
#include<conio.h>
class sum
 {
   int a,b;
   public:
   sum()
    {}
     int getdata(int , int);
 };

    int sum:: getdata(int a,int b)
     {
        int sum;
        sum = a + b;
        return sum;
     }

void main()
{
   sum s1;
   int a,b;

     clrscr();

     cout<<"Enter Number : ";
       cin>>a;
     cout<<"Enter Number : ";
       cin>>b;
     cout<<"The sum : "<<s1.getdata(a,b);

     getch();
}

				
DOCUMENT INFO
Shared By:
Categories:
Tags:
Stats:
views:85
posted:3/21/2010
language:English
pages:1