Quelpr

CAPE Computer Science Unit 1 · 2011 · Paper 2 · Question 6(d)

Write a C program that prompts the user for THREE integers, determines the type of triangle represented according to the given rules, and prints the result or 'No triangle is represented.'

The mark scheme is shown once you've answered.

Practise this question

Other parts of this question

  1. 6(a)Explain the term 'white space'.[2 marks]
  2. 6(b)Define the term 'debugging'.[2 marks]
  3. 6(c)Explain why programmers should practise proper indentation.[2 marks]
  4. 6(e)(i)Show the output generated by the given nested for-loop code segment.[4 marks]
  5. 6(e)(ii)Modify the code in 6(e)(i) so that the specified triangular number pattern output is generated.[4 marks]

More practice: the rest of this paper · more Procedural Programming Constructs in C questions · all CAPE Computer Science Unit 1 past papers