1answer.
Ask question
Login Signup
Ask question
All categories
  • English
  • Mathematics
  • Social Studies
  • Business
  • History
  • Health
  • Geography
  • Biology
  • Physics
  • Chemistry
  • Computers and Technology
  • Arts
  • World Languages
  • Spanish
  • French
  • German
  • Advanced Placement (AP)
  • SAT
  • Medicine
  • Law
  • Engineering
USPshnik [31]
3 years ago
14

Write code that prints: userNum ... 2 1 Print a newline after each number. Ex: userNum

Computers and Technology
1 answer:
ehidna [41]3 years ago
4 0

Answer:

The program to this question can be given as follows:

Program:

public class data //defining class data

{

//main method

public static void main (String [] as) //declaring main method  

{

int userNum = 4; //declare variable userNum and assign value

for (userNum = 1; userNum <= 4; userNum++)  //loop for print values

{

System.out.println(userNum);  //print values in new lines.

}

}

}

Output:

1

2

3

4

Explanation:

In the above java program code firstly a class "data" is defined, inside this class the main method is defined in which an integer variable userNum is defined that holds a value that is "4".

  • In this method, a for loop is declare that uses variable userNum which starts from 1 and ends with a given value that is equal to 4.
  • Inside a for loop, the print function is used that print userNum variable each values in the newline.  

You might be interested in
What is the full form of bcc please tell​
expeople1 [14]

Blind Carbon Copy

For emails. It is used to send a copy of the email to somebody without the original person receiving it knowing that you sent a copy.

3 0
2 years ago
Read 2 more answers
____ is an iterative software development process that focuses on team productivity and delivers software best practices to all
cluponka [151]

Answer:

RUP

Explanation:

RUP or Rational Unified Process is an IBM's software that divides the development process in four phases. It was developed to work throughout the entire software development life cycle, it's adaptive.

I hope you find this information useful and interesting! Good luck!

5 0
3 years ago
A device that filters data traffic at a network boundary​
Semmy [17]

Answer:

Bridges

Explanation:

A bridge is a transition effects that separates network traffic at the network's edge. By splitting a local area network into two parts, bridges minimise the number of bandwidth.

6 0
2 years ago
The energy used by an appliance which operates at 240 volts at 15 amp for 4 hr. is A. 0.92 kwhr. B. 3.45 kwhr. C. 14.4 kwhr. D.
Tju [1.3M]

Answer:

C. 14.4 kwhr.

Explanation:

To calculate the energy used by appliance first calculate the power. The formulae for calculating power(<em>P</em>) is P= I \times V, where V stands for voltage and I stands for current.

In the given problem,  V = 240 volts and I = 15 amp. Therefore,

P=240 \times 15 =3600\ watt(w) = 3.6\ kw

Now, formulae for calculating energy used i.e. work(W) is W = P\times t, where <em>t</em> is the time.

In the given question time is 4 hr. Therefore energy used will be,

Energy used (W) = 3.6\times4 =14.4\ kwhr.

8 0
3 years ago
Notes on secondary memory​
gladu [14]

Answer:

non-volatile and persistent in nature

7 0
3 years ago
Other questions:
  • Although the battery on your smartphone is fully charged, it drains quickly. In some instances when the phone shows that the bat
    12·1 answer
  • List 3 ways that you can use excel and the features it includes and explain why a spreadsheet is the best choice for this task.
    5·1 answer
  • Pointsyour company environment includes windows server versions 2003, 2008, and 2012. desktops range from windows xp and vista.
    13·1 answer
  • The use of electronic media, information, and communication technologies to deliver instruction where students are not required
    8·1 answer
  • What is the difference between a sequential program and an event-driven program?
    9·1 answer
  • sqrt is being defined as a variable name, how do I get its math function to... well... function? (Python)
    11·1 answer
  • Zoom meeting ID:987 6858 5587 Password:196133
    10·2 answers
  • Va rog urgent
    8·1 answer
  • In the context of the data administration component of a database management system (DBMS), the acronym CRUD stands for _____.
    5·1 answer
  • Write an answer in three to five sentences that describes the photo, explains what better lighting would mean for your photograp
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!