91.1k views
3 votes
program 2. write a VB.NET program to solve the linear equation of the form Ax+B=C, i.e x=(C=B)/A (Eg:2x+3=7, where B and C are consonants, A is the coefficient of x)​

User Baddack
by
5.2k points

1 Answer

1 vote

Answer:

Module Program

Sub Main()

Dim A, B, C, x As Double

A = 2.0

B = 3.0

C = 7.0

x = (C - B) / A

Console.WriteLine($"Solution for {A}x + {B} = {C} is x = {x}")

Console.ReadKey()

End Sub

End Module

Step-by-step explanation:

For A=0, the program wouldn't work, because then any x would be a solution.

User Gpsugy
by
4.9k points