Tuesday, June 19, 2012

Homework 8: Invocations invocations

1. printTodaysDate is a function that accepts no parameters and returns no value. Write a statement that calls  printTodaysDate .

printTodaysDate ( ) ;

2. printErrorDescription is a function that accepts one  int parameter and returns no value. Write a statement that calls the function  printErrorDescription , passing it the value 14.

printErrorDescription ( 14 ) ;

3. printLarger is a function that accepts two  int parameters and returns no value. Two  int variables,  sales1 and  sales2 , have already been declared and initialized. Write a statement that calls  printLarger , passing it  sales1 and  sales2 . 

printLarger ( sales1 , sales2 ) ;

No comments:

Post a Comment