Any1 here doing the Cambridge IGCSE computer and IT course? The textbooks' name is 'Computer Studies and Information Technology' by Chris Leadbetter and Stewart Wainwright.
I need help please, with section 3 in the textbook. I hope sum1 here can help....
Step 1. Understand the problem: A list of x many values will be entered and you have to display the total along with how many there are (x).
Step 2. Devise a solution - draw a similar diagram as seen in the book:
Initialise values -> total=0, count=total
Process numbers -> process element in list while current element is not equal to 0 -> read value, add to total, add to count
Display answers -> print total, print count
Initialise vals:
count = 0
total = 0
Process numbers:
while not value of element in list = 0, do:
read element;
add element to total val;
add 1 to count
end while
Display answer:
Print: total (gives total cost)
Print: count (gives number of items)
Hey there! Looks like you're enjoying the discussion, but you're not signed up for an account.
When you create an account, we remember exactly what you've read, so you always come right back where you left off. You also get notifications, here and via email, whenever new posts are made. And you can like posts and share your thoughts.
Sign Up
Bookmarks