Is this solution correct?

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • Icky
    New Member
    • Feb 2010
    • 1

    Is this solution correct?

    When you have a question that is:
    • Calculate a_y where a_y = -9.8m/s^2

    Is the code:
    Console.WriteLi ne("Calculate a_y"); // a_y = 9.8m/s^2?

    Or is that totally off?
  • alexis4
    New Member
    • Dec 2009
    • 113

    #2

    Comment

    • ThatThatGuy
      Recognized Expert Contributor
      • Jul 2009
      • 453

      #3
      Maybe but what are you trying to say

      Comment

      • tlhintoq
        Recognized Expert Specialist
        • Mar 2008
        • 3532

        #4
        When you have a question that is:
        • Calculate a_y where a_y = -9.8m/s^2

        Is the code:
        Console.WriteLi ne("Calculate a_y"); // a_y = 9.8m/s^2?

        Or is that totally off?
        The only thing you are going to write is a string consisting of what you put between the quotes.

        It would have taken less time to just run the line than to post the question.
        Never be afraid of experimenting. Trial and error is the best way to learn.

        Comment

        • Curtis Rutland
          Recognized Expert Specialist
          • Apr 2008
          • 3264

          #5
          Ok, just in case you are completely new to C-style programming...
          The characters "//" begin what is called a comment, more specifically an inline comment. Everything from the // all the way to the end of the line is completely ignored by the compiler. It's a way for you to make notes in your code.

          As to the question, I must say it makes no sense.
          • Calculate a_y where a_y = -9.8m/s^2
          How can you "calculate" something that's just a definition? This is like saying "calculate A where A = 1". I think there is something missing here.

          Comment

          Working...