![]() |
|
"be consistent" | |
PerlMonks |
Sum of Inputby changma_ha (Sexton) |
on Aug 04, 2010 at 09:14 UTC ( #852829=perlquestion: print w/replies, xml ) | Need Help?? |
changma_ha has asked for the wisdom of the Perl Monks concerning the following question: hi all. I am trying to do a program in which the user give some numbers as input and the output is the sum of the numbers in that input. I am getting the sum right but the problem is when i am giving input after it . it takes the output of the fist input as it input.my code is like:
Suppose if i give input as 1 2 3 it should give output as "Total in 1 input is 6" 2 4 5 Total in 2 input is 11 Instead it is giving the 2nd output as 17. plz help me out.Thanks in advance.
Back to
Seekers of Perl Wisdom
|
|