what is the use of comma and semicolon with print statement
Answers
Answer:
Explanation:
A '\n' character is written at the end, unless the print statement ends with a comma. It prevents the print from ending with a newline, allowing you to append a new print to the end of the line.
A semi-colon in print statement ends.
Comma?
When a comma is used at the end of a PRINT statement, the data in the next PRINT statement is continued on the same line beginning in the next print zone. When " " (quote, blank, quote) is used as a print field the computer will skip to the next print field. You are actually telling the computer to print a blank field.
Semicolon:
If a Print statement ends with a semicolon, any item printed by a subsequent Print statement will be printed on the same line, immediately following the last item that was printed. In effect, a semicolon at the end of a Print statement suppresses the carriage return/line feed to the next line.
Note: I hope you understand.