Write code that outputs variable numWeeks as follows. End with a newline. Ex: If the input is: 3 the output is: Weeks: 3
Write code that outputs variable numWeeks as follows. End with a newline.
Ex: If the input is:
3
the output is:
Weeks: 3
The java programming language is used to answer the question.
A variable is a name given to the address of the storage in the computer memory unit. The memory address of the variable is allocated according to the type of data stored in the data type at the time of the declaration of the variable. There are several data types are available in a java programming language to use for data storage.
Below is the declaration of the data type and the variable name is as follows
- dataType varName;
Where dataType can be int, float or double or String type and varName is the name of the variable given to store the data value.
Trending now
This is a popular solution!
Step by step
Solved in 2 steps with 1 images