What is meaning of int total =0?what happens if int total=2 or 5 ... | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

What is meaning of int total =0?what happens if int total=2 or 5 ...

25th Jul 2019, 1:44 PM
Monish S
Monish S - avatar
2 Answers
+ 1
Total=0 is initialise the total value with 0 generally 0 is taken as initial value so we can get correct value You can initialise with any value like if you initialise with 2 then value in output will be greater or lesser then 2 according to the operation performed
25th Jul 2019, 2:03 PM
MsJ
MsJ - avatar
0
Thank u bro
25th Jul 2019, 2:05 PM
Monish S
Monish S - avatar