PDA

View Full Version : This makes me highly suspicious...


Sir Penguin
03-04-2003, 05:23:24
I'm doing my last C SC assignment of the year. Question 1 is:


A.
Re-write the following using a repeat structure rather than a while structure. x and y are integers, and Count is an integer variable:

assign Count the value of x
while (Count < y) do
{ print the value assigned to Count and increment Count }

B.
Re-write the following using a while structure rather than a repeat structure (same conditions as before):

assign Count the value of x
repeat
{ print the value assigned to Count and increment Count }
until (Count = y)


As far as I can figure out, the answer to A. is B. , and the answer to B. is A. :hmm:

SP

Asher
03-04-2003, 06:07:27
Brilliant. :)

Beta1
03-04-2003, 09:56:31
Wish I had papers like that

Darkstar
03-04-2003, 22:25:28
So, you wrote 'See Question 1, part B' 'See Question 1, part A'?

Teachers make test like that when they don't want to bother having to grade papers/work.

Sir Penguin
03-04-2003, 23:53:08
Hell no, I wrote it out in full. I lost 15% on the last assignment because the fucker who marked it mixed up the q in my web page URL with a g; I'm not going to lose 16% on this one just because I'm lazy.

SP