Sunday, June 13, 2021

To find Circumcentre

 #include <stdio.h>

#include <conio.h>

int main()

{

int i;

int a,b;

int m,n;

int p,q;

int x,y;

printf("Program to calculate circumcentre of a triangle(Press Enter)");

getch();

printf("\nEnter the three vertices of the triangle");

scanf("%d%d",&a,&b);

scanf("%d%d",&m,&n);

scanf("%d%d",&p,&q);

for(x=0;x<=100;x++)

{

for(y=0;y<=100;y++)

{

if(   ( (x-a)*(x-a)+(y-b)*(y-b)== (x-m)*(x-m)+(y-n)*(y-n) )  &&   (   (x-a)*(x-a)+(y-b)*(y-b)== (x-p)*(x-p)+(y-q)*(y-q) )         )

{

printf("(%d,%d) is the circumcentre",x,y);

goto a;

}                                                        

}

continue;

a:

break;

}

}

No comments:

Post a Comment

Meet links

 Section 11A meet.google.com/edcdmynkjh Section 11 B meet.google.com/tapmhdtkfj Section 11C meet.google.com/sxajjevufp Section !!D meet.goog...