about loops(Pardon my poor English standard, thanks) | Sololearn: Learn to code for FREE!
New course! Every coder should learn Generative AI!
Try a free lesson
0

about loops(Pardon my poor English standard, thanks)

I did a little altering on the coads below: in this program, you can type some numbers and add them on. The time you are allowed to type in depends on the value you allocate to "n " at first . for example, if you wanna to add a,b,c on you're supposed to type in "3" firstly and type in a,b,c in a row. if you type in a number called d after c,"d" will be ignored. But, the problem is that, if you only type in "a" and "b", the result it outputs will be( a+b+b).Why ? Hope to get your help. Thanks a lot.

13th May 2018, 4:59 AM
HZCK_Mi Sa Pon
HZCK_Mi Sa Pon - avatar
2 Answers
13th May 2018, 4:59 AM
HZCK_Mi Sa Pon
HZCK_Mi Sa Pon - avatar
0
anybody here?
13th May 2018, 4:18 PM
HZCK_Mi Sa Pon
HZCK_Mi Sa Pon - avatar