Study the following program and answer the given question:
DECLARE FUNCTION diff (A,B)
CLS
INPUT"ENTER FIRST NUMBER;";A
INPUT"ENTER SECOND NUMBER;";B
PRINT"THE DIFFERENCE OF THE TWO NUMBERS=";diff (A,B)
END
FUNCTION diff (A,B)
END
FUNCTION diff(A,B)
D = A - B
DIFF = D
END FUNCTION
- What will be the output of the program if the user inputs 200 as the first number and 100 as the second number?
- Will the program run if the first line is (i.e. DECLARE....) is deleted?
1 Answer
1.
The output is: "The difference of the two numbers = 100"
2.
Yes, the program will run.
-
Who is a system analyst? What are the characteristics of system analysts? 1
-
What are the different stages of the system development life cycle (SDLC) 1
-
What do you understand about AI? What are the negative and positive aspects of AI in society? 1
-
How does an AI application work? Can a computer really think with the aid of AI? 1