137k views
4 votes
Program 3.Study the code carefully and write out the line where there is error, debug it and write out the correct code

1. ModuleModule1
2. Sub Main0
3. Dim num AsDouble
4. Num=10.0
5. Console.writeLine('The square root of '&num & "is"$Math.sqrt(num))
6. Console.ReadKey0
7. EndSub
8. EndModule​

User Ramesh S
by
4.1k points

1 Answer

4 votes

Answer:

Several errors:

  • 0 where ( ) was intended (probably OCR problem)
  • space between As and Double
  • Single quote in stead of double quote in text string
  • $ in stead of & near Math.sqrt
  • missing spaces around "is" for proper formatting

Program 3.Study the code carefully and write out the line where there is error, debug-example-1
User LucaA
by
4.4k points