Q. Rewrite the given program (of displaying the greatest number among 3 numbers entered by the user) in your notebook after correcting the 6 errors.
Textwindow.writeline (Enter 3 numbers:") numl=Textwindow.ReadNumber() num2=Textwindow.ReadNumber() 3num=Textwindow.ReadNumber
If ( num1>num2 & numl>num3) then Textwindow.Writeline numi" is the greatest number.") Elseif (num2>num3)
Textwindow.writeline num2 +" is the greatest number.") Else Textwindow.writeline num3 + " is the greatest number.")
Answers
Answered by
1
Answer:
Textwindow.writeline ("Enter 3 numbers:")
num1=Textwindow.ReadNumber()
num2=Textwindow.ReadNumber()
num3=Textwindow.ReadNumber ()
If ( num1>num2 & num1>num3) then
Textwindow.Writeline (num1 + " is the greatest number.")
Else if (num2>num3)
Textwindow.writeline (num2 +" is the greatest number.")
Else
Textwindow.writeline (num3 + " is the greatest number.")
EndIf
Answer:
Explanation:
Similar questions