c-programing-

c-programing-

I have the code so i need you to check them 🙂 and put them in one program

part A is in a file.

part B is this :

#include <iostream>

#include <math.h>//header files

using namespace std;

//global vairables declare

int var_x_1, var_x_2, var_x_3, var_y_1, var_y_2, var_y_3, centreX, centreY;

double radius;

//function declaration

void get3points();

void calucateCenterPoints();

void calucateRadiusValue();

void outputInfo();

int main() //start main function

{

get3points(); // function calling

calucateCenterPoints();

calucateRadiusValue();

outputInfo();

return 0;

} //end of main function

void get3points()

{

cout<<“First co-ordinates :-“<<endl; // user input

cin>>var_x_1>>var_y_1;

cout<<“Second co-ordinates :-“<<endl; //user input

cin>>var_x_2>>var_y_2;

cout<<“Third co-ordinates :-“<<endl; // user input

cin>>var_x_3>>var_y_3;

}

void calucateCenterPoints()

{

//calculation for finding ‘x’ co-ordinates of center

centreX = -1 * ((( var_x_3*var_x_3 – var_x_2*var_x_2 + var_y_3*var_y_3 – var_y_2*var_y_2)/(2*(var_y_3-var_y_2)) ) -((var_x_2*var_x_2 – var_x_1*var_x_1 + var_y_2*var_y_2 – var_y_1*var_y_1)/(2 *(var_y_2-var_y_1)))) /((var_x_2-var_x_1)/(var_y_2-var_y_1))-((var_x_3-var_x_2)/(var_y_3-var_y_2));

//calculation for finding ‘y’ co-ordiunates of center

centreY = (-1 * centreX*((var_x_2-var_x_1)/(var_y_2-var_y_1))) +( (var_x_2*var_x_2 – var_x_1*var_x_1 + var_y_2*var_y_2 -var_y_1*var_y_1)/ (2 * (var_y_2-var_y_1)) );

}

void calucateRadiusValue()

{

//calculateion for radius of circle

radius = sqrt( pow(centreX-var_x_1, 2)+ pow(centreY-var_y_1, 2));

}

void outputInfo()

{

//print the info on the console

cout<<“Centre is “<<centreX<<” , “<<centreY<<endl;

cout<<“Radius is “<<radius<<endl;

}

#write essay #research paper #blog writing #article writing #academic writer #reflective paper #essay pro #types of essays #write my essay #reflective essay #paper writer #essay writing service #essay writer free #essay helper #write my paper #assignment writer #write my essay for me #write an essay for me #uk essay #thesis writer #dissertation writing services #writing a research paper #academic essay #dissertation help #easy essay #do my essay #paper writing service #buy essay #essay writing help #essay service #dissertation writing #online essay writer #write my paper for me #types of essay writing #essay writing website #write my essay for free #reflective report #type my essay #thesis writing services #write paper for me #research paper writing service #essay paper #professional essay writers #write my essay online #essay help online #write my research paper #dissertation writing help #websites that write papers for you for free #write my essay for me cheap #pay someone to write my paper #pay someone to write my research paper #Essaywriting #Academicwriting #Assignmenthelp #Nursingassignment #Nursinghomework #Psychologyassignment #Physicsassignment #Philosophyassignment #Religionassignment #History #Writing #writingtips #Students #universityassignment #onlinewriting #savvyessaywriters #onlineprowriters #assignmentcollection #excelsiorwriters #writinghub #study #exclusivewritings #myassignmentgeek #expertwriters #art #transcription #grammer #college #highschool #StudentsHelpingStudents #studentshirt #StudentShoe #StudentShoes #studentshoponline #studentshopping #studentshouse #StudentShoutout #studentshowcase2017 #StudentsHub #studentsieuczy #StudentsIn #studentsinberlin #studentsinbusiness #StudentsInDubai #studentsininternational