Featured Post

Step Wise Project Planning

Planning is the most difficult process in project management. The framework described is called the Stepwise method to help to distinguis...

  1. Home

Addition of two coordinates


 #include<iostream.h>
#include<conio.h>
struct point
{
int x,y;
};
int main()
{
struct point p1,p2,p3;
clrscr();
cout<<"Enter p1 coordinates";
cin>>p1.x>>p1.y;
cout<<"Enter p2 coordinates";
cin>>p2.x>>p2.y;
p3.x=p1.x+p2.x;
p3.y=p1.y+p2.y;
cout<<"The coordinates of p1+p2"<<p3.x<<p3.y;
return 0;
}

Output


Previous
Next Post »