OCR A Level: Decision 1 - Miscellaneous Algorithms [January 2012 Q6]

The function INT ( C ) \text{INT}(C) gives the largest integer that is less than or equal to C. For example: INT ( 4.8 ) = 4 \text{INT}(4.8) = 4 , INT ( 7 ) = 7 \text{INT}(7) = 7 , INT ( 0.8 ) = 0 \text{INT}(0.8) = 0 , INT ( 0.8 ) = 1 \text{INT}(-0.8) = -1 , INT ( 2.4 ) = 3 \text{INT}(-2.4) = -3 .

Consider the following algorithm:

( i ) (\text{i}) Apply the algorithm using the inputs A = 10 A = 10 and B = 128 B = 128 . Record the values of A A , B B , C C , D D , E E , and F F every time they change. Record the output each time line 60 is reached.

( ii ) (\text{ii}) Show what happens when the input values are A = 10 A = 10 and B = 13 B = -13 .


Input the sum of all values of F F outputted in part ( i ) (\text{i}) .


There are 4 marks available for part (i) and 5 marks for part (ii).
In total, this question is worth 12.5% of all available marks in the paper.

This is part of the set OCR A Level Problems .


The answer is 11.

This section requires Javascript.
You are seeing this because something didn't load right. We suggest you, (a) try refreshing the page, (b) enabling javascript if it is disabled on your browser and, finally, (c) loading the non-javascript version of this page . We're sorry about the hassle.

2 solutions

Michael Fuller
Mar 16, 2016

The mark scheme for this question: Large Version

Moderator note:

As seen from the mark scheme, what the question is asking for requires you to print out all of the intermediary steps.

0 pending reports

×

Problem Loading...

Note Loading...

Set Loading...