none
can i add symbol of multiplication to if statement ? RRS feed

Answers

  • TextWindow.Write("a? ")
    a = TextWindow.ReadNumber()
    TextWindow.Write("b? ")
    b = TextWindow.ReadNumber()
    TextWindow.Write("c? ")
    c = TextWindow.ReadNumber()
    If a * b = c Then
      TextWindow.WriteLine("a * b = c")
    Else
      TextWindow.WriteLine("a * b <> c")
    EndIf
    You can use "*" as multiplication symbol.



    Nonki Takahashi

    Tuesday, March 19, 2013 3:18 AM
    Moderator
  • The asterisk (*) is the standard multiplication operator in any (or almost) programming language known!

    Nonetheless, you can use × or ÷ for display. Maybe even as a variable name!


    Click on "Propose As Answer" if some post solves your problem or "Vote As Helpful" if some post has been useful to you! (^_^)

    Tuesday, March 19, 2013 3:57 AM
    Answerer

All replies

  • TextWindow.Write("a? ")
    a = TextWindow.ReadNumber()
    TextWindow.Write("b? ")
    b = TextWindow.ReadNumber()
    TextWindow.Write("c? ")
    c = TextWindow.ReadNumber()
    If a * b = c Then
      TextWindow.WriteLine("a * b = c")
    Else
      TextWindow.WriteLine("a * b <> c")
    EndIf
    You can use "*" as multiplication symbol.



    Nonki Takahashi

    Tuesday, March 19, 2013 3:18 AM
    Moderator
  • The asterisk (*) is the standard multiplication operator in any (or almost) programming language known!

    Nonetheless, you can use × or ÷ for display. Maybe even as a variable name!


    Click on "Propose As Answer" if some post solves your problem or "Vote As Helpful" if some post has been useful to you! (^_^)

    Tuesday, March 19, 2013 3:57 AM
    Answerer