have i written this program correctly ?

Printable View