Academic Integrity: tutoring, explanations, and feedback — we don’t complete graded work or submit on a student’s behalf.

UST USE \"C\" PROGRAMMING ONLY!!!! MUST USE ARRAY AND POINTERS WHERE SPECIFIED F

ID: 3603946 • Letter: U

Question

UST USE "C" PROGRAMMING ONLY!!!! MUST USE ARRAY AND POINTERS WHERE SPECIFIED FOLLOW DIRECTIONS OR I WILL RATE POORLY AND REPORT TO CHEG 2. (USE Pointer ARRAY FOR THE COEFFICIENTS simlaneous equations Create a script that will solve a set of ax+by = c dx + ey =f a, b, c, d, e, and f are user input. ce-b ae-bd af-cd Your script should be able to calculate x and y Also the script should ask the user whether he /she would like to continue on finding answers for other equations and then continue on with the answer Y". Your output should have the format of -With given values of “a','b", "e,''d”,''e", and "f,' the answer for x is "Answer" and y is "Answe All a", "b", "c", "d", "e", and "f have to be included in a single ARRAY and its pointer! All the computation has to be done by using POINTER ONLY!

Explanation / Answer

#include <stdio.h>

int main(void) {

float *coeff[6] ; //array of pointers

int i;

float x,y;

char option = 'O';

float a,b,c,d,e,f;

coeff[0] = &a;

coeff[1] = &b;

coeff[2] = &c;

coeff[3] = &d;

coeff[4] = &e;

coeff[5] = &f;

do

{

printf(" Enter the values of coefficients a,b,c,d,e,f : ");

scanf("%f %f %f %f %f %f ",&a,&b,&c,&d,&e,&f);

x = (c*e - b*f )/(a*e - b*d);

y = (a*f - c*d)/(a*e - b*d);

printf(" With given values of %f %f %f %f %f %f the answer for x is %f and answer for y is %f",a,b,c,d,e,f,x,y);

printf(" Do you want to solve other equations[Y/N]? : ");

scanf(" %c",&option);

if(option != 'Y')

break;

}while(option == 'Y');

return 0;

}

output: