⭐ 欢迎来到虫虫下载站! | 📦 资源下载 📁 资源专辑 ℹ️ 关于我们
⭐ 虫虫下载站

📄 http:^^www.cs.wisc.edu^~mbirk^cs110^assignments^prog0.html

📁 This data set contains WWW-pages collected from computer science departments of various universities
💻 HTML
字号:
Date: Mon, 11 Nov 1996 21:42:14 GMTServer: NCSA/1.5Content-type: text/htmlLast-modified: Tue, 29 Oct 1996 14:24:33 GMTContent-length: 4037<html><head><title> Program 0 </title></head><body><center> <h2> Program 0 </h2> </center><p> CS110 Section 8<br> TA: Michael Birk<br> <strong> Assigned: </strong> Tue 9/29/96<br> <strong> Due: </strong> Tue 10/5/96<p> Program 0 is designed to provide experience with the lab machines, thesoftware we will be using, and the handin process.  You are <em>not</em>expected to write any C++ code on your own or understand the given code inany way.<p> This assignment does require, however, minimal working knowledgeof Microsoft Windows.  If you are unfamiliar with Windows and don't wantto "jump right in," then check out the<!WA0><!WA0><!WA0><a href="http://www.cs.wisc.edu/~cs302/C++/Introduction/MSwindows.html">Introduction to Microsoft Windows</A>.<p> <strong>Note:</strong> If you have difficulty at any point duringthis assignment, do not hesitate to ask the on-duty lab consultants forassistance.  That's what they're there for, and they need something tokeep them busy during this first week. :-)<h3> What to Do </h3><p> First, you must go to the lab in 1350 Comp Sci & St and log in.  Ofcourse, since you're reading this now, you've probably gotten that faralready!  After logging in, run Borland C++ by double-clicking on its icon.Since you will be starting a new program, choose "File" and then "New" fromthe menu.  This will bring up a blank editing window for you to enter yourprogram.<p> Now you are ready to type in the <em>source code</em> for Program 0. The source code isfound on page 21 of the Savitch text book.  (In case you didn't bring your book, click <!WA1><!WA1><!WA1><ahref="http://www.cs.wisc.edu/~mbirk/cs110/assignments/prog0.cpp">here</a> to see the source code.) Type this program in exactly as it iswritten.  Now, so that you know which program is yours when you print it out, add a<em>comment</em> (a line beginning with two slashes) at the top of your program with your nameand other information.  For instance, the top few lines of your program might look somethinglike this: <pre>// John Q. Doe   CS110 Section 7// Program 0: Sample C++ Program</pre><p> After you have entered the source code, give you program a name bychoosing "File" and then "Save as" from the menu.  (Initially your programwill have the rather mundane title of "noname00.cpp".)  In the window thatpops up, type <strong>prog0</strong>.  This will save your source code ina file named "prog0.cpp" (Borland C++ automatically adds the ".cpp" suffix,which stands for "C-plus-plus.")<p> Now, <em>compile</em> and <em>run</em> the program by clicking on the small "lightningbolt" icon (or choose "Debug" and then "Run" from the menu).  This will bring up yet anotherwindow, which asks you to enter the number of "pods" and "peas in a pod," then calculates andprints the number of "peas in all."  Afther this, the window becomes "inactive," meaning theprogram has finished and you should close the window by double-clicking on the box in theupper-left corner.<p> If, when trying to run your program, you get "errors" instead of a blankwindow, this means that you made a typo when entering the source code.  Findthe typo and fix it, and then try running the program again. The <em>linenumber</em> of the error message may give an indication of where the typois.<p> Try running the program a few times, entering different numbers. Afteryou've tested the program and are certain it is working, <em>print</em> ahard copy by selecting "File" and then "Print" from the menu.  Click "OK" onthe window which pops up.  This printout will show up on one of the laserprinters in room 1359.  (Unfortunately, there is no simple way to know whichof the four printers it will be on.)<p> That's it!  Hang on to the printout, and hand it in at the beginning ofclass on the due date.  You can now exit Borland C++ by choosing "File" andthen "Exit" from the menu.  To log out of the system, choose "File" and then"Exit Windows" from the Program Manager window.<hr><address> <!WA2><!WA2><!WA2><a href="mailto:mbirk@cs.wisc.edu">mbirk@cs.wisc.edu</a> </address></body></html>

⌨️ 快捷键说明

复制代码 Ctrl + C
搜索代码 Ctrl + F
全屏模式 F11
切换主题 Ctrl + Shift + D
显示快捷键 ?
增大字号 Ctrl + =
减小字号 Ctrl + -