Re: programming of qbasic

by (Login MCalkins)


Did you read the Homework Help link Clippy gave you?

We won't do your homework for you. You need to show the initiative to do it yourself. This is not a very difficult assignment. The only difficulty is that they want the result on paper. I would say output it to a file, and then print it with Notepad...

I believe it can be done correctly in 11 lines of code, including variable declarations (3 lines), variable assignment (3 lines), output to a file (3 lines), executing Notepad to print the file (1 line), terminating the program (1 line).

Actually, it doesn't even seem that the program needs to print it, only display it, and the user print it. In that case, 8 lines of code should suffice.

Try it, post your effort, and then we can help you...


Posted on May 24, 2011, 2:02 PM

Respond to this message   

Return to Index

Response TitleAuthor and Date
At least tell him how to get Pi properly!Unseen on May 24
 *Yes, but the specification said "Take 3.142 for II". I'd say follow the spec. on May 24
 *A fair approximation of Pi: 355/113 on May 25
  that's only 7 digitsunclejed613 on Jun 22
   * You don't need to guess! ... PI# = 4 * ATN(1#) on Jun 22
    and the reason... on Jun 23
     Unfortunately Qbasic won't allow it to define a CONSTant on Jun 23
      * I don't see why not... C and C++ both allow it... on Jun 23
       Because Galleon seems to LIKE ERRORS! on Jun 23
      Re: Unfortunately Qbasic won't allow it to define a CONSTant on Jun 23
       I tried to get a Constant PI value for QB64 on Jun 23
        Don't really see the point of CONSTDavid on Jun 24
         * Um... Avogardo's number is 6.022e23 not 6.626e23...qbguy on Jun 24
          So that's why I get the wrong answerDavid on Jun 24
           * THATS THE REASON! You CAN FORGET THEM silly! on Jun 24
         Re: Don't really see the point of CONST on Jun 24
          a quick disclaimer on Jun 24
           Yes I think you're correctDavid on Jun 24
        _pi, perhaps... on Jun 24
   *welcome to the forum, unclejed. on Jun 23

 Copyright © 1999-2014 Network54. All rights reserved.   Terms of Use   Privacy Statement