Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. Algorithms
  4. Need help with this Pseudocode

Need help with this Pseudocode

Scheduled Pinned Locked Moved Algorithms
helptutorial
10 Posts 5 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • B Offline
    B Offline
    B Sho
    wrote on last edited by
    #1

    Hi I am in a college programming class and I am kind of confused how to write this pseudocode. It says "Write the pseudocode for problem 9-2.5" 9-2.5- Prompt the user to input a temperature in the Fahrenheit scale. Then display its equivalent in the Celsius scale. Repeat until a temperature of 9999 is entered. Example Preudocode: INPUT length, width LET area = length * width OUTPUT area or LET count = 1 LET total_area = 0 DO WHILE count < = 4 INPUT length, width LET area = length * width LET total_area = total_area + area LET count = count +1 LOOP OUTPUT total_area

    Richard Andrew x64R B Kornfeld Eliyahu PeterK 3 Replies Last reply
    0
    • B B Sho

      Hi I am in a college programming class and I am kind of confused how to write this pseudocode. It says "Write the pseudocode for problem 9-2.5" 9-2.5- Prompt the user to input a temperature in the Fahrenheit scale. Then display its equivalent in the Celsius scale. Repeat until a temperature of 9999 is entered. Example Preudocode: INPUT length, width LET area = length * width OUTPUT area or LET count = 1 LET total_area = 0 DO WHILE count < = 4 INPUT length, width LET area = length * width LET total_area = total_area + area LET count = count +1 LOOP OUTPUT total_area

      Richard Andrew x64R Offline
      Richard Andrew x64R Offline
      Richard Andrew x64
      wrote on last edited by
      #2

      What exactly are you confused about? What have you tried so far?

      The difficult we do right away... ...the impossible takes slightly longer.

      B 1 Reply Last reply
      0
      • Richard Andrew x64R Richard Andrew x64

        What exactly are you confused about? What have you tried so far?

        The difficult we do right away... ...the impossible takes slightly longer.

        B Offline
        B Offline
        B Sho
        wrote on last edited by
        #3

        I am unsure how to write this pseudocode altogether lol.

        Richard Andrew x64R 1 Reply Last reply
        0
        • B B Sho

          I am unsure how to write this pseudocode altogether lol.

          Richard Andrew x64R Offline
          Richard Andrew x64R Offline
          Richard Andrew x64
          wrote on last edited by
          #4

          It amounts to simply writing down the steps necessary to complete the task. Since it's pseudo code, you don't need to be technically accurate. What is the first thing that has to happen to solve this problem? What is the second thing? Hint: 1. User enters number 2. First step to calculate answer 3. Second step to calculate answer

          The difficult we do right away... ...the impossible takes slightly longer.

          1 Reply Last reply
          0
          • B B Sho

            Hi I am in a college programming class and I am kind of confused how to write this pseudocode. It says "Write the pseudocode for problem 9-2.5" 9-2.5- Prompt the user to input a temperature in the Fahrenheit scale. Then display its equivalent in the Celsius scale. Repeat until a temperature of 9999 is entered. Example Preudocode: INPUT length, width LET area = length * width OUTPUT area or LET count = 1 LET total_area = 0 DO WHILE count < = 4 INPUT length, width LET area = length * width LET total_area = total_area + area LET count = count +1 LOOP OUTPUT total_area

            B Offline
            B Offline
            BillWoodruff
            wrote on last edited by
            #5

            Here's one clue: when you want to have a loop that is guaranteed to be executed once, that construct is: Do ... While. In this case consider: Do // code // code While (the user has not entered 9999)

            "What Turing gave us for the first time (and without Turing you just couldn't do any of this) is he gave us a way of thinking about and taking seriously and thinking in a disciplined way about phenomena that have, as I like to say, trillions of moving parts. Until the late 20th century, nobody knew how to take seriously a machine with a trillion moving parts. It's just mind-boggling." Daniel C. Dennett

            1 Reply Last reply
            0
            • B B Sho

              Hi I am in a college programming class and I am kind of confused how to write this pseudocode. It says "Write the pseudocode for problem 9-2.5" 9-2.5- Prompt the user to input a temperature in the Fahrenheit scale. Then display its equivalent in the Celsius scale. Repeat until a temperature of 9999 is entered. Example Preudocode: INPUT length, width LET area = length * width OUTPUT area or LET count = 1 LET total_area = 0 DO WHILE count < = 4 INPUT length, width LET area = length * width LET total_area = total_area + area LET count = count +1 LOOP OUTPUT total_area

              Kornfeld Eliyahu PeterK Offline
              Kornfeld Eliyahu PeterK Offline
              Kornfeld Eliyahu Peter
              wrote on last edited by
              #6

              There is no standard for writing pseudo-code, so you almost free to write without bounds of language syntax (however I saw universities with there own standard, and if you have something like this at your college, you should use it). Read about the idea of pseudo-code - start here http://en.wikipedia.org/wiki/Pseudocode[^] This is one sample to the '9-2.5' problem...

              GET temp_f
              WHILE temp_f != 9999
              COMPUTE temp_c = (temp_f - 32) * 5/9
              PRINT temp_c
              GET temp_f
              LOOP

              I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is (V).

              "It never ceases to amaze me that a spacecraft launched in 1977 can be fixed remotely from Earth." ― Brian Cox

              B Richard Andrew x64R 2 Replies Last reply
              0
              • Kornfeld Eliyahu PeterK Kornfeld Eliyahu Peter

                There is no standard for writing pseudo-code, so you almost free to write without bounds of language syntax (however I saw universities with there own standard, and if you have something like this at your college, you should use it). Read about the idea of pseudo-code - start here http://en.wikipedia.org/wiki/Pseudocode[^] This is one sample to the '9-2.5' problem...

                GET temp_f
                WHILE temp_f != 9999
                COMPUTE temp_c = (temp_f - 32) * 5/9
                PRINT temp_c
                GET temp_f
                LOOP

                I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is (V).

                B Offline
                B Offline
                B Sho
                wrote on last edited by
                #7

                Thanks a lot man! I appreciate it!

                1 Reply Last reply
                0
                • Kornfeld Eliyahu PeterK Kornfeld Eliyahu Peter

                  There is no standard for writing pseudo-code, so you almost free to write without bounds of language syntax (however I saw universities with there own standard, and if you have something like this at your college, you should use it). Read about the idea of pseudo-code - start here http://en.wikipedia.org/wiki/Pseudocode[^] This is one sample to the '9-2.5' problem...

                  GET temp_f
                  WHILE temp_f != 9999
                  COMPUTE temp_c = (temp_f - 32) * 5/9
                  PRINT temp_c
                  GET temp_f
                  LOOP

                  I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is (V).

                  Richard Andrew x64R Offline
                  Richard Andrew x64R Offline
                  Richard Andrew x64
                  wrote on last edited by
                  #8

                  You're not supposed to do the work for him!

                  The difficult we do right away... ...the impossible takes slightly longer.

                  Kornfeld Eliyahu PeterK 1 Reply Last reply
                  0
                  • Richard Andrew x64R Richard Andrew x64

                    You're not supposed to do the work for him!

                    The difficult we do right away... ...the impossible takes slightly longer.

                    Kornfeld Eliyahu PeterK Offline
                    Kornfeld Eliyahu PeterK Offline
                    Kornfeld Eliyahu Peter
                    wrote on last edited by
                    #9

                    I believe in innocent. His not asked just because his lazy but because he don't know how to ask even. So beside to give him some - not very bright - solution I tried to point him to the right direction...

                    I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is (V).

                    "It never ceases to amaze me that a spacecraft launched in 1977 can be fixed remotely from Earth." ― Brian Cox

                    L 1 Reply Last reply
                    0
                    • Kornfeld Eliyahu PeterK Kornfeld Eliyahu Peter

                      I believe in innocent. His not asked just because his lazy but because he don't know how to ask even. So beside to give him some - not very bright - solution I tried to point him to the right direction...

                      I'm not questioning your powers of observation; I'm merely remarking upon the paradox of asking a masked man who he is (V).

                      L Offline
                      L Offline
                      Lost User
                      wrote on last edited by
                      #10

                      It's quite clear from the original question that this is a college assignment. So by giving him the answer you are not really helping him. It's much better that people like him learn to think for themselves and at least try to work out the answer.

                      Veni, vidi, abiit domum

                      1 Reply Last reply
                      0
                      Reply
                      • Reply as topic
                      Log in to reply
                      • Oldest to Newest
                      • Newest to Oldest
                      • Most Votes


                      • Login

                      • Don't have an account? Register

                      • Login or register to search.
                      • First post
                        Last post
                      0
                      • Categories
                      • Recent
                      • Tags
                      • Popular
                      • World
                      • Users
                      • Groups