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
#include
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 :-"< cin>>var_x_1>>var_y_1; cout<<"Second co-ordinates :-"< cin>>var_x_2>>var_y_2; cout<<"Third co-ordinates :-"< 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 "< cout<<"Radius is "< } #include
using namespace std;
double transaction;
double currentBalance(5000);
char
void
void
void
void
void
void
pickTransaction(void);
message(void);
deposit(void);
withdraw(void);
PayUtilityBill(void);
TransferFunds(void);
closeAccount(void);
// This code only perform one transaction. Modify it to give the user
opportunity to perform as many operations as she/he desires.
int main()
{
char choice=’y’;
cout