Square - cout << "The...

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

View Full Document Right Arrow Icon
#include <iostream> using namespace std ; int square (int x) { return x * x ; } int main() { int a = 3 ; int b = square (a) ; cout << "The square of " << a << " is " << b << endl ;
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: cout &lt;&lt; &quot;The square of &quot; &lt;&lt; 5 &lt;&lt; &quot; is &quot; &lt;&lt; square(5) &lt;&lt; endl ; return 0 ; }...
View Full Document

This note was uploaded on 10/28/2010 for the course CSCI 1113 taught by Professor Staff during the Spring '08 term at Minnesota.

Ask a homework question - tutors are online