Explore Westonci.ca, the top Q&A platform where your questions are answered by professionals and enthusiasts alike. Join our platform to connect with experts ready to provide detailed answers to your questions in various areas. Get detailed and accurate answers to your questions from a dedicated community of experts on our Q&A platform.

Retype each statement to follow the good practice of a single space around operators.

a. tot = num1+num2+2;
b. numBalls=numBalls+1;
c. numEntries = (userVal+1)*2;


Sagot :

Answer:

a. tot = num1 + num2 + 2;

b. numBalls = numBalls + 1;

c. numEntries = (userVal + 1) * 2;

Explanation:

Given

(a), (b) and (c)

Require:

Rewrite

There isn't much to do or explain; All you need to do is include single space between the operands and opcodes

So:

tot = num1+num2+2;   becomes tot = num1 + num2 + 2;

numBalls=numBalls+1; becomes numBalls = numBalls + 1;

numEntries = (userVal+1)*2; becomes  numEntries = (userVal + 1) * 2;

The difference in both statements is the inclusion of single line spacing.