Saturday, January 7, 2012

Quiz 2 - Functions

Write a program that will illustrate the use of the function for computing the square of a number. There must be three other functions aside from mai(). The first function must be responsible for inputting the data and second must be responsible for computation and the third for displaying the result.

Sample output:

Input N: 3
The square of 1 is 1
The square of 2 is 4
The square of 3 is 9

No comments:

Followers

Visitor

free counters

FEEDJIT Live Traffic Feed