Explore BrainMass
Share

Variables, output of program

This content was STOLEN from BrainMass.com - View the original, and get the already-completed solution here!

Main module
Call Input module
Call Calculations module
Call Output Module
Call Greeting module
End Program

Input module
Declare LastName as a character variable
Declare Num as interger
Write "Enter your last name"
Input LastName
Write "Enter the course number"
Input Num
Return

Calculations module
Declare NewNum as interger
NewNum = 10 * Num
Return

Greetings module
Write "Have a nice day!"
Return

Output module
Write Name, NewNum
Return

1. List the varibables: Declare Num as Interger
Declare NewNum as Interger

2. Show the output of the screen when the program executes with a value of 200.
2000

3. When this program runs, what will be the last statement executed?
NewNum

© BrainMass Inc. brainmass.com October 24, 2018, 7:01 pm ad1c9bdddf
https://brainmass.com/computer-science/program-execution/variables-output-program-55458

Solution Preview

1. There are three varibables: Declare Num as Interger
Declare NewNum as Interger
Declare LastName as ...

Solution Summary

Variables and the output of program are considered. The character variables are declared for the input modules.

$2.19
See Also This Related BrainMass Solution

Declaring and initializing Java variables

Need help with declaring and initializing java variables. I am trying to compile and execute a program. I have downloaded the file and attached it.

Sample:
Calculate your age in the year 2060.
1. Declare an integer variable name newAge.
2. Declare and initialize an integer variable named currentAge. Initialize this variable with your current age.
3. Declare and initialize an integer variable named currentYear. Initialize this variable with the value of the currentYear. Use four digits for year. Use four digits for the year.
4. Compile the source code file Newage.java.
5. Execute the program. Record the output of this program.

Please refer to attachment for full questions.

View Full Posting Details