Practice
ProceduresExtendedAS & A Level 9618

Print a heading with a procedure

PROCEDURE practice for A Level Computer Science: output a line of stars, a title, then another line of stars.

Write a procedure Heading that outputs a line of 10 asterisks, then a title, then another line of 10 asterisks.

The main program should call Heading with the title Report.

Your program should

  • Declare PROCEDURE Heading with a STRING parameter Title.
  • The procedure outputs a line of 10 asterisks, then the title, then another line of 10 asterisks.
  • The main program uses CALL Heading("Report").

Sample input

—

Sample output

**********
Report
**********

Starter

Pseudocode
// Write PROCEDURE Heading(Title : STRING) and call it with "Report".