183k views
17 votes
Write a pseudocode statement that declares the variable total so it can hold integers. Initialize the variable with the value 0

User Nccc
by
3.7k points

1 Answer

11 votes

Answer:

Declare total = 0

Step-by-step explanation:

Given

Variable name: total

Variable type: integer

Variable value: 0

Required

Write a pseudocode statement

Because total is meant to hold integer values, it can be initialized as:

total = 0

Using total = 0.0 means that total is meant to hold floating values. So, we make use of

total = 0

However, this variable must be declared before being initialized.

So, we make use of the following statement to declare the variable:

Declare total

"Declare total" and "total = 0" gives:

Declare total = 0

User Nok Imchen
by
3.4k points