-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathCODE22.cpp
More file actions
44 lines (40 loc) · 1021 Bytes
/
CODE22.cpp
File metadata and controls
44 lines (40 loc) · 1021 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
#include <iostream> //SQUARE ROOT
#include<math.h>
using namespace std;
class MakingPoint
{
int a,b;
public:
MakingPoint(int x,int y)
{
a=x;
b=y;
}
void getdata(void)
{
cout<<"this is your a "<<a<<endl<<"this is your b "<<b<<endl<<endl;
}
friend void FindPara( MakingPoint,MakingPoint);
};
void FindPara( MakingPoint p,MakingPoint q)
{
int r = (p.a-q.a);
int o;
o=r*r;
int w = (p.b-q.b);
int k;
k=w*w;
int v=o+k;
cout<<" this is your data "<<r<<endl;
cout<<" this is your data "<<w<<endl;
cout<<" this is your data "<<v<<endl;
cout<<" this is your data "<<sqrt(v)<<endl;
}
int main()
{
MakingPoint p(7,8);
MakingPoint q(3,5);
p.getdata();
q.getdata();
FindPara(p,q);
}