patirots
patirots patirots
  • 04-02-2018
  • Computers and Technology
contestada

If you wanted to continuously add 5 to a count, how would you code it? Why do you prefer this method?

(from code.org)

Respuesta :

Аноним Аноним
  • 05-02-2018
The word is increment. If you wan to keep adding adding 5 to a count you are incrementing the count. There are a few ways to do it and it also depends on the language that is being used.

PHP
$count = $count + 5;
$count++

C / C++
int count = 0;
count++;

Python
count += 5
Answer Link

Otras preguntas

Which contains an error in logic as worded? Wearing bell-bottom pants and a tie-dyed shirt was a fad during the 1960s. A fad during the 1960s was wearing bell-b
In which sentence is the number written correctly? A. My uncle will turn thirty one on Tuesday. B. We donated twenty six bags of clothes to a charity. C. Th
Slime moulds (Acrasiomycota) are protoctists. They feed on decaying organic matter, bacteria and protozoa. I. Detritivore II. Autotroph III.
In the division problem 64.94 ÷ 8.5, should the dividend and the divisor be multiplied by 10 or 100 to make the divisor a whole number
why autotroph are important
How does a deep ocean current compare to a surface one? A. same salinity, but colder and less dense B. same temperature, but saltier and denser C. colder,
How do you solve for a missing component x ? 180:x::12:24
The trustworthiness of a speaker adds to the speaker's A. emotional appeal. B. ethical appeal. C. verbal appeal. D. appeal to reasoning.
In "Ooka and the Honest Thief," why does Gonta steal?
what is one of the primary reasons that trade between nations takes place