By using program c 2 Create a script that will solve a set o

By using program c 2. Create a script that will solve a set of simultaneous equations. ax by c a, b, c, d, e, and fare user input. ce bf aff -cd ae bd 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 Your output should have the format of f\", the answer for x is \"Answer\" and y is With given values of \"a\", \"b\", \"c\", \"d\'\'. \"e\", and \"Answer\"

Solution

#include <stdio.h>
int main(){
   double a,b,c,d,e,f,x,y;
   char ureq = \'Y\';
   while(ureq==\'Y\'){
   printf(\"enter the value a:\");
   scanf(\"%d\",&a);
       printf(\"enter the value b:\");
   scanf(\"%d\",&b);
       printf(\"enter the value c:\");
   scanf(\"%d\",&c);
       printf(\"enter the value d:\");
   scanf(\"%d\",&d);
       printf(\"enter the value e:\");
   scanf(\"%d\",&e);
       printf(\"enter the value f:\");
   scanf(\"%d\",&f);
   x = (c*e-b*f)/(a*e-b*d);
   y = (a*f-c*d)/(a*e-b*d);
   printf(\"With given values of %d, %d, %d, %d, %d and %d, the answer for x is %d and y is %d\ \",a,b,c,d,e,f,x,y);
   printf(\"Would you like to continue to find the answer of another equation:\");
   ureq = getchar();
}
return 0;
}

 By using program c 2. Create a script that will solve a set of simultaneous equations. ax by c a, b, c, d, e, and fare user input. ce bf aff -cd ae bd Your scr

Get Help Now

Submit a Take Down Notice

Tutor
Tutor: Dr Jack
Most rated tutor on our site