-
Notifications
You must be signed in to change notification settings - Fork 1
/
array 3.c
62 lines (45 loc) · 920 Bytes
/
array 3.c
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
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
#include<stdio.h>
#include<math.h>
sum();
main(){
sum();
}
sum(){
int arr1[10]={};
int arr2[10]={};
int arr3[10]={};
int arr4[10]={};
int i;
printf("enter x1 coordinates \n \n");
for(i=0;i<=10;i++)
{
scanf("%d",&arr1[i]);
}
printf("enter x2 coordinates \n ");
for(i=0;i<=10;i++)
{
scanf("%d",&arr2[i]);
}
printf("enter y1 coordinates \n");
for(i=0;i<=10;i++)
{
scanf("%d",&arr3[i]);
}
printf("enter y2 coordinates \n");
for(i=0;i<=10;i++)
{
scanf("%d",&arr4[i]);
}
for(i=0;i<=10;i++)
{
int jj, j,bb,aa,cc,summ;
aa=(arr2[i]-arr1[i]);
cc=arr4[i]-arr3[i];
j=(pow(aa,2)+pow(cc,2));
bb=pow(j,0.5);
jj=jj+1;
printf("%d",jj);
printf("%d",bb);
printf("\n");
}
}