If there are x cars and y yellow cars, clearly the new car is yellow, since 1/9 > 1/10
y = x/10
y+1 = (x+1)/9
There are now 81 cars, with 9 yellow.
One-tenth of the cars in a car park are yellow. Another car arrives and now one-ninth of the cars are yellow.
How many cars are now in the car park?
3 answers
For the code, something like
count=0
for i=1..2000
with student[i] do {
read name,sex,score
pct = score*5/2
sub45 = false
if pct < 45 then
if sex = "F" then
count++
print name
}
}
}
print "There were ",count," females scoring below 45%"
count=0
for i=1..2000
with student[i] do {
read name,sex,score
pct = score*5/2
sub45 = false
if pct < 45 then
if sex = "F" then
count++
print name
}
}
}
print "There were ",count," females scoring below 45%"
81