1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
marissa [1.9K]
2 years ago
15

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 c

onsonants, A is the coefficient of x)​
Computers and Technology
1 answer:
mariarad [96]2 years ago
4 0

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

Explanation:

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

You might be interested in
Which type of element is , and what is the meaning of that element?
IrinaK [193]

Answer:

1. Semantic

2. modifies

Explanation:

Semantic HTML is understood by the traditional browser, and semantic tags are the one that ensures not just presentation, but also adds the meaning to the webpage. And hence, img here is both semantic as well as presentational. Hence, the first option is semantic. And the IMG modifies the meaning of the web page. The description is done by the text. And hence the second option is modified.

.

6 0
2 years ago
You have a small company and want to keep your costs low, but it is important your employees share data. Which network would pro
Crank

Answer:

centralised

Explanation:

duhh

7 0
3 years ago
Read 2 more answers
Consider the following code segment.
Bingel [31]

Answer:

A.)

arr[0] = 10;

arr[1] = 10;

Explanation:

Given the array:

arr = {1,2,3,4,5}

To set the first two elements of array arr to 10.

Kindly note that ; index numbering if array elements starts from 0

First element of the array has an index of 0

2nd element of the array has an index of 1 and so on.

Array elements can be called one at a time using the array name followed by the index number of the array enclosed in square brackets.

arr[0] = 10 (this assigns a value of 10 to the index value, which replace 1

arr[1] = 10 (assigns a value of 10 to the 2nd value in arr, which replaces 2

3 0
3 years ago
Write an assembly code to implement the y=(x1+x2)*(x3+x4) expression on 2-address machine, and then display the value of y on th
Ratling [72]

mbly code to implement the y=(x1+x2)*(x3+x4) expression on 2-address machine, and then display the value of y on the screen. Assume that the values of the variables are known. Hence, do not worry about their values in your code.

The assembly instructions that are available in this machine are the following:

Load b, a Load the value of a to b

Add b, a Add the value of a to the value of b and pla

7 0
3 years ago
A painting company has determined that for every 115 square feet or wall space, one gallon of paint and eight hours of labor wil
Kay [80]

The program to calculate the total paint cost and other values is given below.

#include <iostream>

using namespace std;

int main() {  

 int rooms, laborChrg = 18;

 float paintChrg;

 float feetPerRoom[rooms];  

 float paintReq, laborHrs, paintCost, laborCost, totalCost, totalsqft=0;  

 cout<<"Enter the number of rooms to be painted "<<endl;

 cin>>rooms;  

 for(int i=0; i <= rooms; i++)

 {

 cout<<"Enter the square feet in room "<<endl;

 cin>>feetPerRoom[i];  

 // shortcut operator which is equivalent to totalsqft = totalsqft +     feetPerRoom[i];

 totalsqft += feetPerRoom[i];

 }  

 cout<<"Enter the cost of the paint per gallon "<<endl;

 cin>>paintChrg;  

 laborHrs = (totalsqft/115)*8;

 laborCost = laborHrs * laborChrg;  

 paintReq = totalsqft/115;

 paintCost = paintReq * paintChrg;  

 totalCost = laborCost + paintCost;  

 cout<<"The number of gallons of paint required "<<paintReq<<endl;

 cout<<"The hours of labor required "<<laborHrs<<endl;

 cout<<"The cost of the paint is "<<paintCost<<endl;

 cout<<"The labor charges are "<<laborHrs<<endl;

 cout<<"The Total cost of the paint job is "<<totalCost<<endl;  

 return 0;

}

Explanation:

The header files for input and output are imported.

#include <iostream>

using namespace std;

All the variables are taken as float except labour charge per hour and number of rooms.

The user is asked to input the number of rooms to be painted. An array holds the square feet in each room to be painted.

cout<<"Enter the number of rooms to be painted "<<endl;

cin>>rooms;  

for(int i=0; i <= rooms; i++)

{

cout<<"Enter the square feet in room "<<endl;

cin>>feetPerRoom[i];  

totalsqft += feetPerRoom[i];

}  

The above code asks for square feet in each room and calculates the total square feet to be painted simultaneously.

All the data to be displayed is calculated based on the values of labor charge per hour and gallons of paint needed, given in the question.

laborHrs = (totalsqft/115)*8;

laborCost = laborHrs * laborChrg;

paintReq = totalsqft/115;

paintCost = paintReq * paintChrg;

totalCost = laborCost + paintCost;

All the calculated values are displayed in the mentioned order.

7 0
3 years ago
Other questions:
  • If a class has member variables that are pointers, you must ensure that you implement ____.
    6·1 answer
  • Which ipv6 static route would serve as a backup route to a dynamic route learned through ospf?
    12·1 answer
  • Your company has recently been hired to install a smart security system for a large office building. The system will include sec
    12·1 answer
  • A collection of facts can be copyrighted, but only if the collection is ____ in a way that causes the resulting work to rise to
    14·1 answer
  • 1- Which of the following is the java keyword used to declare a class?
    5·2 answers
  • In the cases of int, byte, long, short (In Java) Can you give the heirachy in ascending order?​
    6·1 answer
  • select all examples of proper keyboarding technique. rest your fingers gently on the home row or home keys. slouch in your chair
    9·2 answers
  • To change the name of a field, press and hold or right-click the column heading for the field, tap or click ____ on the shortcut
    7·1 answer
  • Which option is referred to by the Reports Due tag?
    7·1 answer
  • Which of the following is typiacally the last step of the mail merge process
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!