Code:
#include<stdio.h>
int main(){
char s='(';
char ss=')';
int x1,x2,y1,y2;
float mid1,mid2;
printf("Enter x1\n");
scanf("%d",&x1);
printf("Enter y1\n");
scanf("%d",&y1);
printf("Enter x2\n");
scanf("%d",&x2);
printf("Enter y2\n");
scanf("%d",&y2);
mid1=((x1+x2)/2.0);
mid2=((y1+y2)/2.0);
printf("Binoy's house is located at %c%.1f , %.1f%c",s,mid1 , mid2,ss);
return 0;
}
No comments