Chapter 6 - int abs (int number) { if (number <...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Chapter 6 – User-Defined Functions 1 abs(x) ceil(x) cos(x) exp(x) fabs(x) floor(x) pow(x,y) tolower(x) toupper(x) User-Defined Functions Value returning Void functions 1) name of function 2) # of parameters 3) data type of parameters 4) data type of return heading / body of function
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: int abs (int number) { if (number < 0) number = -number; } Formal / Actual Parameters Return statement Function to return largest of 2 numbers Function to compare three numbers Function Prototype 1) Palindrome # 2) Largest number function 3) Program to count # of vowels...
View Full Document

Ask a homework question - tutors are online