Quantcast
Channel: Recent Questions - Stack Overflow
Viewing all articles
Browse latest Browse all 12111

linear equations with unknown cofficients how to write in c language [closed]

$
0
0

How to write this in c programming language.

enter image description here

Here is my thought:

#include <stdio.h>int main() {  double a, b, c, n, y;  printf("Enter a: ");  scanf("%lf", &a);  printf("Enter b: ");  scanf("%lf", &b);  printf("Enter c: ");  scanf("%lf", &c);  printf("Enter n: ");  scanf("%lf", &n);  printf("Enter y: ");  scanf("%lf", &y);  a *n + a *y == b *y + c;  a *y - b *y == c - a *n;  y *(a - b) == c - a *n;  y = (c - a * n) / (a - b);  printf("\ny = %lf", y);  return 0;}

Can someone give me a example?How to print exactly like image?


Viewing all articles
Browse latest Browse all 12111

Trending Articles



<script src="https://jsc.adskeeper.com/r/s/rssing.com.1596347.js" async> </script>