http:^^www.cs.wisc.edu^~milo^cs302^program1.html
来自「This data set contains WWW-pages collect」· HTML 代码 · 共 106 行
HTML
106 行
Date: Mon, 11 Nov 1996 17:13:18 GMTServer: NCSA/1.5Content-type: text/htmlLast-modified: Wed, 11 Sep 1996 21:37:48 GMTContent-length: 3481<HTML><HEAD><TITLE>Program 1 - CS 302 Fall 1996 - Section 4</TITLE></HEAD><BODY><H1 ALIGN=CENTER> <!WA0><!WA0><!WA0><!WA0><!WA0><!WA0><!WA0><!WA0><!WA0><!WA0><!WA0><!WA0><A HREF="http://www.cs.wisc.edu/~cs302">CS 302</A> Fall 1996 - <!WA1><!WA1><!WA1><!WA1><!WA1><!WA1><!WA1><!WA1><!WA1><!WA1><!WA1><!WA1><A HREF="http://www.cs.wisc.edu/~milo/cs302.html">Section 4</A></H1> <H2 ALIGN=CENTER>Algebraic Language Programming in C++</H2><H4 ALIGN=CENTER>Instructor: <!WA2><!WA2><!WA2><!WA2><!WA2><!WA2><!WA2><!WA2><!WA2><!WA2><!WA2><!WA2><A HREF="http://www.cs.wisc.edu/~milo">Milo M. Martin</A> (milo@cs.wisc.edu)</H4><hr><br><H1 ALIGN=CENTER>Program 1</H1><H3 ALIGN=CENTER>Due Wednesday, September 18, 1996</H3> <hr><br><P>In program 1 you will be writing your first program. You may write on your program to execute <B>one</B> of the following three formulas:<br><UL><LI>Conversion from degrees Celsius to degrees Farenheit<BR><I>F = ((9.0/5.0)*C)+32</I><LI>Conversion from degrees Farenheit to degrees Celsius<BR><I>C = (F-32)*(5.0/9.0)</I><LI>The volume of a sphere<BR><I>V = (4.0/3.0)*PI*r<SUP>3</SUP></I></UL>For this assignment, all input comes from the keyboard and output is sentto the display. Remember to prompt for and read the necessary inputvariables. It is also a good idea to check your results with a calculatorto make sure you don't have any logic errors! The calculations should bedone using <TT>double</TT> variable types. The answers should bedisplayed only with a reasonable number of decimal places. <p>You should use your <TT>U:\PROGRAMS\PROG1</TT> directory to hold the files for this assignment. <p><B>Turn in the assignment following the guidelines given in <!WA3><!WA3><!WA3><!WA3><!WA3><!WA3><!WA3><!WA3><!WA3><!WA3><!WA3><!WA3><A HREF="http://www.cs.wisc.edu/~milo/cs302/turnin.html">Turning in Assignments</A>. </B> Turn into me a print out ofyour code and a number of test runs. Staple all of your pages together. See below on how to print out your output. To avoid mixing up your outputwith others, at the beginning of your program, have it print your name and section using <TT>cout</TT>. <H3>Commenting Your Program:</H3><P>Comments are required for this and all subsequent programs. They are used todocument your program, but are ignored by the compiler. As you develop yourprogram, comments are added for clarification and explanation. In C++ commentsfollow after // and continue only to the end of the line. You may also use Ccomments, which are between /* and */ and can span several lines. Comments arefound at the top of the program, including:<P><ul> <li>Your name <li>CS302, section 4 <li>Instructor: Milo Martin <li>Program number <li>Due date <li>A general description of the program - This description should tell what the program does and how to use it. Also mention any limitations, unresolved bugs, or special features of the program. </ul>In the code place comments: <ul> <li> After any constants or variables forwhich it would not be clear what they are used for to someone who does notknow what the program does. <li>To label and briefly explain the main steps of the algorithm with comments. <li>By any unclear or convoluted code to explain it's purpose. </ul><p><H3>Printing Your Output</H3>After your program has finished is should say "inactive" at the top of theoutput window. When it says this, click on the upper lefthand corner ofthe window to activate a pull down menu. Select <B>Print</B> from thismenu, then click ok. <hr><ADDRESS>Created by<!WA4><!WA4><!WA4><!WA4><!WA4><!WA4><!WA4><!WA4><!WA4><!WA4><!WA4><!WA4><A HREF = "http://www.cs.wisc.edu/~dyao/cs302.html">Dan Yao</A>, <!WA5><!WA5><!WA5><!WA5><!WA5><!WA5><!WA5><!WA5><!WA5><!WA5><!WA5><!WA5><A HREF = "http://www.cs.wisc.edu/~dzimm/cs302.html">Dave Zimmermann</A>& <!WA6><!WA6><!WA6><!WA6><!WA6><!WA6><!WA6><!WA6><!WA6><!WA6><!WA6><!WA6><A HREF="http://www.cs.wisc.edu/~milo">Milo Martin</A></ADDRESS></BODY></HTML>
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?