oldmacdonald - << noise...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
Sheet1 #include <iostream> #include <string> using namespace std void refrain() { cout << "Old MacDonald had a farm, Ee-igh, ee-igh, oh!" << endl } void hadA(string animal) { cout << "And on his farm he had a " << animal << ", Ee-igh, ee-igh, oh!" << endl } void withA(string noise) { cout << "With a " << noise << " "
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: &lt;&lt; noise &lt;&lt; &quot; here&quot; &lt;&lt; endl cout &lt;&lt; &quot;With a &quot; &lt;&lt; noise &lt;&lt; &quot; &quot; &lt;&lt; noise &lt;&lt; &quot; there&quot; &lt;&lt; endl cout &lt;&lt; &quot;Here a &quot; &lt;&lt; noise &lt;&lt; &quot;, &quot; &lt;&lt; &quot;there a &quot; &lt;&lt; noise &lt;&lt; &quot;, &quot; &lt;&lt; &quot; everywhere a &quot; &lt;&lt; noise &lt;&lt; &quot; &quot; &lt;&lt; noise &lt;&lt; endl } void cow() { refrain() hadA(&quot;cow&quot;) withA(&quot;moo&quot;) refrain() } int main() { cow() return 0 } Page 1...
View Full Document

This note was uploaded on 03/19/2008 for the course CSC 121 taught by Professor Deng during the Fall '08 term at Pennsylvania State University, University Park.

Page1 / 2

oldmacdonald - &amp;amp;lt;&amp;amp;lt; noise...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online