130k views
0 votes
Write a statement that assigns finalResult with firstSample plus secondSample, divided by 3. Ex: If firstSample is 18 and secondSample is 12, finalResult is 10.

1 Answer

2 votes

Answer:

finalResult=(firstSample+secondSample)/3; //coded inc++

Step-by-step explanation:

The above code is executed in c++. As it involves basic arithmetic, so, if whole program has to be written,then they can be declared of type int,float or double as required and then the above statement must be used in which firstSample and secondSample has been added first and the result is divided by 3 to obtain the desired output.

User Blazerg
by
3.6k points