Monday, 25 March 2013

C++ Sum of two numbers using pointers

#include<iostream.h>
void main(){
int n,m,*no,*mo;
no=&n;
mo=&m;
cout<<"Enter the two numbers";
cin>>*no>>*mo;
//*no=2;
//*mo=3;
cout<<"sum of two numbers via pointer is as under = "<<n+m;}