Write the BASIC 256 statements for the following:
1. To store the words "Science" and "Social” in two variables Subjectl and Subject2.
2.To accept the data for the variable "Class" along with a proper message.
3. Divide the value x and y and store result in Z
Answers
Answer:
BASIC 256 is a modern version of the BASIC programming language designed for education, it is designed to be easy to use and understand, therefore it uses simple commands and statements.
1.To store the words "Science" and "Social" in two variables Subject1 and Subject2:
Subject1 = "Science"
Subject2 = "Social"
2.To accept the data for the variable "Class" along with a proper message:
input "Enter the Class: ", Class
3. Divide the value of x and y and store the result in Z:
Z = x / y
Please note that in order to use these statements, the variables x,y and z should be declared and have the proper value before using this statement.
Also, it's assumed that the code would work fine with other code structure, such as if this is a part of a function or subroutine and is getting executed after receiving the values for x and y.