{\rtf1\ansi\ansicpg1252\uc1 \deff0\deflang1033\deflangfe1033{\fonttbl{\f0\froman\fcharset0\fprq2{\*\panose 02020603050405020304}Times New Roman{\*\falt Thorndale};}{\f1\fswiss\fcharset0\fprq2{\*\panose 020b0604020202020204}Arial;}
{\f29\fswiss\fcharset128\fprq2{\*\panose 020b0604020202020204}Arial Unicode MS;}{\f30\fswiss\fcharset128\fprq2 @Arial Unicode MS;}{\f39\froman\fcharset238\fprq2 Times New Roman CE{\*\falt Thorndale};}
{\f40\froman\fcharset204\fprq2 Times New Roman Cyr{\*\falt Thorndale};}{\f42\froman\fcharset161\fprq2 Times New Roman Greek{\*\falt Thorndale};}{\f43\froman\fcharset162\fprq2 Times New Roman Tur{\*\falt Thorndale};}
{\f44\froman\fcharset177\fprq2 Times New Roman (Hebrew){\*\falt Thorndale};}{\f45\froman\fcharset178\fprq2 Times New Roman (Arabic){\*\falt Thorndale};}{\f46\froman\fcharset186\fprq2 Times New Roman Baltic{\*\falt Thorndale};}
{\f47\fswiss\fcharset238\fprq2 Arial CE;}{\f48\fswiss\fcharset204\fprq2 Arial Cyr;}{\f50\fswiss\fcharset161\fprq2 Arial Greek;}{\f51\fswiss\fcharset162\fprq2 Arial Tur;}{\f52\fswiss\fcharset177\fprq2 Arial (Hebrew);}
{\f53\fswiss\fcharset178\fprq2 Arial (Arabic);}{\f54\fswiss\fcharset186\fprq2 Arial Baltic;}{\f273\fswiss\fcharset0\fprq2 Arial Unicode MS Western;}{\f271\fswiss\fcharset238\fprq2 Arial Unicode MS CE;}{\f272\fswiss\fcharset204\fprq2 Arial Unicode MS Cyr;}
{\f274\fswiss\fcharset161\fprq2 Arial Unicode MS Greek;}{\f275\fswiss\fcharset162\fprq2 Arial Unicode MS Tur;}{\f276\fswiss\fcharset177\fprq2 Arial Unicode MS (Hebrew);}{\f277\fswiss\fcharset178\fprq2 Arial Unicode MS (Arabic);}
{\f278\fswiss\fcharset186\fprq2 Arial Unicode MS Baltic;}{\f281\fswiss\fcharset0\fprq2 @Arial Unicode MS Western;}{\f279\fswiss\fcharset238\fprq2 @Arial Unicode MS CE;}{\f280\fswiss\fcharset204\fprq2 @Arial Unicode MS Cyr;}
{\f282\fswiss\fcharset161\fprq2 @Arial Unicode MS Greek;}{\f283\fswiss\fcharset162\fprq2 @Arial Unicode MS Tur;}{\f284\fswiss\fcharset177\fprq2 @Arial Unicode MS (Hebrew);}{\f285\fswiss\fcharset178\fprq2 @Arial Unicode MS (Arabic);}
{\f286\fswiss\fcharset186\fprq2 @Arial Unicode MS Baltic;}}{\colortbl;\red0\green0\blue0;\red0\green0\blue255;\red0\green255\blue255;\red0\green255\blue0;\red255\green0\blue255;\red255\green0\blue0;\red255\green255\blue0;\red255\green255\blue255;
\red0\green0\blue128;\red0\green128\blue128;\red0\green128\blue0;\red128\green0\blue128;\red128\green0\blue0;\red128\green128\blue0;\red128\green128\blue128;\red192\green192\blue192;}{\stylesheet{\ql \li0\ri0\nowidctlpar\faauto\rin0\lin0\itap0 
\fs24\cf1\lang1033\langfe255\cgrid\langnp1033\langfenp255 \snext0 Normal;}{\s1\ql \li0\ri0\sb240\sa60\keepn\nowidctlpar\aspalpha\faauto\rin0\lin0\itap0 \b\fs28\cf1\lang1033\langfe255\loch\f1\hich\af0\dbch\af0\cgrid\langnp1033\langfenp255 
\sbasedon15 \snext15 heading 1;}{\s2\ql \li0\ri0\keepn\nowidctlpar\aspalpha\faauto\rin0\lin0\itap0 \b\fs20\cf1\lang1033\langfe255\cgrid\langnp1033\langfenp255 \sbasedon0 \snext0 heading 2;}{\*\cs10 \additive Default Paragraph Font;}{
\s15\ql \li0\ri0\nowidctlpar\aspalpha\faauto\rin0\lin0\itap0 \fs20\cf1\lang1033\langfe255\cgrid\langnp1033\langfenp255 \snext15 Default;}{\s16\ql \li0\ri0\sa120\nowidctlpar\aspalpha\faauto\rin0\lin0\itap0 
\fs20\cf1\lang1033\langfe255\cgrid\langnp1033\langfenp255 \sbasedon15 \snext16 Text body;}{\s17\ql \li0\ri0\sb240\sa120\keepn\nowidctlpar\aspalpha\faauto\rin0\lin0\itap0 \fs28\cf1\lang1033\langfe255\loch\f1\hich\af0\dbch\af0\cgrid\langnp1033\langfenp255 
\sbasedon15 \snext16 Heading;}{\s18\ql \fi-360\li360\ri0\nowidctlpar\aspalpha\faauto\rin0\lin360\itap0 \fs20\cf1\lang1033\langfe255\cgrid\langnp1033\langfenp255 \sbasedon15 \snext18 List;}{
\s19\ql \fi-360\li720\ri0\nowidctlpar\aspalpha\faauto\rin0\lin720\itap0 \fs20\cf1\lang1033\langfe255\cgrid\langnp1033\langfenp255 \sbasedon15 \snext19 List 2;}{\s20\ql \li0\ri0\nowidctlpar\tqc\tx4320\tqr\tx8640\aspalpha\faauto\rin0\lin0\itap0 
\fs20\cf1\lang1033\langfe255\cgrid\langnp1033\langfenp255 \sbasedon15 \snext20 header;}{\s21\ql \li0\ri0\nowidctlpar\tqc\tx4320\tqr\tx8640\aspalpha\faauto\rin0\lin0\itap0 \fs20\cf1\lang1033\langfe255\cgrid\langnp1033\langfenp255 \sbasedon15 \snext21 
footer;}{\s22\ql \li0\ri0\sa120\nowidctlpar\aspalpha\faauto\rin0\lin0\itap0 \fs20\cf1\lang1033\langfe255\cgrid\langnp1033\langfenp255 \sbasedon16 \snext22 Table Contents;}{\s23\qc \li0\ri0\sa120\nowidctlpar\aspalpha\faauto\rin0\lin0\itap0 
\b\i\fs20\cf1\lang1033\langfe255\cgrid\langnp1033\langfenp255 \sbasedon22 \snext23 Table Heading;}{\s24\ql \li0\ri0\sb120\sa120\nowidctlpar\aspalpha\faauto\rin0\lin0\itap0 \i\fs20\cf1\lang1033\langfe255\cgrid\langnp1033\langfenp255 \sbasedon15 \snext24 
caption;}{\s25\ql \li0\ri0\nowidctlpar\aspalpha\faauto\rin0\lin0\itap0 \fs20\cf1\lang1033\langfe255\cgrid\langnp1033\langfenp255 \sbasedon15 \snext25 Index;}{\s26\qc \li0\ri0\sb240\sa60\nowidctlpar\aspalpha\faauto\rin0\lin0\itap0 
\b\fs32\cf1\lang1033\langfe255\loch\f1\hich\af0\dbch\af0\cgrid\langnp1033\langfenp255 \sbasedon15 \snext27 Title;}{\s27\qc \li0\ri0\sa60\nowidctlpar\aspalpha\faauto\rin0\lin0\itap0 
\fs24\cf1\lang1033\langfe255\loch\f1\hich\af0\dbch\af0\cgrid\langnp1033\langfenp255 \sbasedon15 \snext16 Subtitle;}{\*\cs28 \additive \fs24\cf1\lang0\langfe255\langfenp255 Numbering Symbols;}{\*\cs29 \additive \fs24\cf1\lang0\langfe255\langfenp255 
WW-Default Paragraph Font;}{\*\cs30 \additive \fs24\cf1\lang0\langfe255\langfenp255 \sbasedon29 page number;}}{\info{\title hw01 - cs131 - f03}{\author CNRS}{\operator CNRS}{\creatim\yr2001\mo6\dy25\hr10\min4}{\revtim\yr2003\mo8\dy29\hr23\min17}
{\printim\yr2002\mo8\dy29\hr18\min43}{\version6}{\edmins3}{\nofpages1}{\nofwords376}{\nofchars2144}{\*\company CNRS-HSU}{\nofcharsws2632}{\vern8269}}\margl1440\margr1440\margt1400\margb720 
\widowctrl\ftnbj\aenddoc\noxlattoyen\expshrtn\noultrlspc\dntblnsbdb\nospaceforul\hyphcaps0\horzdoc\dghspace120\dgvspace120\dghorigin1701\dgvorigin1984\dghshow0\dgvshow3\jcompress\viewkind1\viewscale100\nolnhtadjtbl \fet0\sectd 
\sbknone\linex0\headery709\sectdefaultcl {\header \pard\plain \s20\ql \li0\ri0\nowidctlpar\tqc\tx4320\tqr\tx8640\aspalpha\faauto\rin0\lin0\itap0 \fs20\cf1\lang1033\langfe255\cgrid\langnp1033\langfenp255 {\fs16 CS 131 - Homework #1\tab \tab p. }
{\field{\*\fldinst {\\page\\* ARABIC}}{\fldrslt {1}}}{
\par }{\fs16 Fall 2003
\par }}{\*\pnseclvl1\pnucrm\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl2\pnucltr\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl3\pndec\pnstart1\pnindent720\pnhang{\pntxta .}}{\*\pnseclvl4\pnlcltr\pnstart1\pnindent720\pnhang{\pntxta )}}
{\*\pnseclvl5\pndec\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl6\pnlcltr\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl7\pnlcrm\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl8
\pnlcltr\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}{\*\pnseclvl9\pnlcrm\pnstart1\pnindent720\pnhang{\pntxtb (}{\pntxta )}}\pard\plain \s15\qc \li0\ri0\nowidctlpar\aspalpha\faauto\rin0\lin0\itap0 
\fs20\cf1\lang1033\langfe255\cgrid\langnp1033\langfenp255 {\b\fs22 CS 131 - Intro to Computer Science I - Fall 2003
\par Homework #1 
\par DUE: Friday, September 5th, }{\b\fs22\ul Beginning}{\b\fs22  of Lab
\par }\pard \s15\ql \li0\ri0\nowidctlpar\aspalpha\faauto\rin0\lin0\itap0 {\fs22 
\par You are to work individually on this assignment.
\par }{\fs22 
\par }{\b\fs22 FIRST: note }{\fs22 that the}{\b\fs22  Reading Packet #2 - Section 2 }{\fs22 has had some corrections made; the revised version is available from the Blackboard course site, under "Course Documents".}{\b\fs22 
\par }{\fs22 
\par }{\b\fs22 SECOND: }{\fs22 this homework is unusual in that, because it uses}{\b\fs22  expr_play}{\fs22  and}{\b\fs22  funct_play0}{\fs22 ,}{\b\fs22  }{\fs22 you do not have to do anything extra to "turn it in"; each time you run  }{\b\fs22 expr_play}{
\fs22  and }{\b\fs22 funct_play0,}{\fs22  they send me what I need to see by e-mail, so (this time!), you don't have to do anything extra except for calling these programs appropriately. This will not be the case for very many CS 131 homeworks!}{\b\fs22 

\par }{\fs22 
\par }{\b\fs22 THIRD: }{\fs22 Read }{\b\fs22 Reading Packet #3}{\fs22 , now available via the }{\b\fs22 Course Documents }{\fs22 section of the Blackboard course site, for next Wednesday's lecture (Sept. 3}{\fs22\super rd}{\fs22 ).}{\b\fs22 
\par }\pard \s15\ql \fi-450\li420\ri0\nowidctlpar\aspalpha\faauto\rin0\lin420\itap0 {\b\fs22 
\par 1.\tab }{\fs22 Consider the following; write each as a C++ expression, and test it under }{\b\fs22 expr_play}{\fs22 . (question to think about, not to turn in: did you get what you expected for each? do you understand why that was the result?)}{\b\fs22 

\par }{\fs22 
\par }\pard \s15\ql \fi-435\li855\ri0\nowidctlpar\aspalpha\faauto\rin0\lin855\itap0 {\fs22 (a)\tab the integer 17
\par (b)\tab the product of 17 and 12
\par (c)\tab 170 minus (5.0 raised to the 12th power)
\par }{\fs22 (d)\tab the product of 5 and 6 and 7 and 8
\par }\pard \s15\ql \fi-450\li420\ri0\nowidctlpar\aspalpha\faauto\rin0\lin420\itap0 {\b\fs22 
\par 2.\tab }{\fs22 Consider }{\b\fs22 Exercise 2.1.1}{\fs22  in Reading Packet #2, in Section 2, subsection 2.1. If you do indeed find any of those functions provided, practice calling them in an expression within }{\b\fs22 expr_play}{\fs22 
 at least once each. }{\b\fs22 
\par }{\fs22 
\par \tab (}{\b\fs22 note}{\fs22 : if you are sure you have the right function name but are getting error messages, try your expression using a floating point argument instead of an integer...)
\par 
\par }{\b\fs22 3.\tab }{\fs22 Consider }{\b\fs22 Exercise 2.1.2}{\fs22  in Reading Packet #2, Section 2, subsection 2.1. Do what it asks, and if you do indeed find the function it requests at the end, practice calling it at least once within }{\b\fs22 
expr_play}{\fs22 , also.}{\b\fs22 
\par }{\fs22 
\par }{\b\fs22 4.\tab }{\fs22 Consider the function }{\b\fs22 area_of_disk}{\fs22  in Reading Packet #2, Section 2, subsection 2.2. Type it in using }{\b\fs22 funct_play0}{\fs22 
 (discussed in lab on 8-29, and also mentioned in the next reading packet, Reading Packet #3); test it on at least the arguments }{\b\fs22 5}{\fs22 , then }{\b\fs22 3}{\fs22 , then }{\b\fs22 13.7}{\fs22  (and then on as many more as you like after that).}
{\b\fs22 
\par }{\fs22 
\par }{\b\fs22 5.\tab }{\fs22 Write a function }{\b\fs22 big_rig_wheel_area}{\fs22  that uses }{\b\fs22 area_of_disk}{\fs22  to figure out the area of the wheels (in strictly a }{\b\fs22 2}{\fs22 -dimensional sense... 8-) ) of an 18-wheel big rig, given the}{
\b\fs22  diameter}{\fs22  of its wheels. (That is, I am making two important requirements for}{\b\fs22  big_rig_wheel_area}{\fs22  -- its parameter is the wheel's}{\b\fs22  diameter}{\fs22 , and it must appropriately call}{\b\fs22  area_of_disk}{\fs22 
 within its body.) Type it in using}{\b\fs22  funct_play0}{\fs22 , and test it (once it is able to run) on at least the arguments}{\b\fs22  20}{\fs22  and}{\b\fs22  25}{\fs22  (and then on as many more as you'd like after that).}{\b\fs22  
\par }{\fs22 
\par 
\par }}