Help needed in creation and order of algorithm.

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • sicarie
    Recognized Expert Specialist
    • Nov 2006
    • 4677

    #31
    Originally posted by sslionheart
    where can i get a compiler?

    and no they do not match so thats what makes it not valid?
    There are a few different places - it's just a matter of which one you are most comfortable with. I personally like GCC but I'm a Linux guy. Some people like the Bloodshed compiler, I've seen Turbo C++ around, and there is always Visual C++.

    Yep, the types are invalid - an integer type cannot hold a character type.

    Comment

    • sslionheart
      New Member
      • May 2007
      • 20

      #32
      myAge = "departmentCode "

      so this would be valid correct?

      Comment

      • sicarie
        Recognized Expert Specialist
        • Nov 2006
        • 4677

        #33
        Originally posted by sslionheart
        myAge = "departmentCode "

        so this would be valid correct?
        Nope - this is another issue. By putting it in quotes, you're saying 'the letters that make up the string departmentCode, ' so these are characters as well.

        Comment

        • sslionheart
          New Member
          • May 2007
          • 20

          #34
          so its not valid for the same reason as without quotations?

          ok now e says 42=myAge is that not valid becuase myAge needs to be on the other side?

          Comment

          • sicarie
            Recognized Expert Specialist
            • Nov 2006
            • 4677

            #35
            Originally posted by sslionheart
            so its not valid for the same reason as without quotations?

            ok now e says 42=myAge is that not valid becuase myAge needs to be on the other side?
            Right, because the association is to the left (whatever is on the left will take on the value of what is on the right).

            Comment

            • sslionheart
              New Member
              • May 2007
              • 20

              #36
              f. yourRate = 3.5 valid?

              g. yourRate= myAge valid?

              h. yourRate = departmentCode not valid because an integer type cannot hold a character type?

              Comment

              • sicarie
                Recognized Expert Specialist
                • Nov 2006
                • 4677

                #37
                Originally posted by sslionheart
                f. yourRate = 3.5 valid?

                g. yourRate= myAge valid?

                h. yourRate = departmentCode not valid because an integer type cannot hold a character type?
                Ha, this is your homework, but you are doing well so far ;). Read up on 'double' type as well. If there is one you're confused about, put it in the compiler - it will spit out the answer right away, then you just have to figure out why. If you're still confused, post the line you tried, and the error.

                Comment

                • sslionheart
                  New Member
                  • May 2007
                  • 20

                  #38
                  im installing visual c++ right now

                  hopefully i can figure out how to use it!

                  Comment

                  • sslionheart
                    New Member
                    • May 2007
                    • 20

                    #39
                    um it is not working with windows vista...

                    Comment

                    • sslionheart
                      New Member
                      • May 2007
                      • 20

                      #40
                      i got it working but where do i go in the program to test them?

                      Comment

                      Working...