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 IP address and TCP port number used by the client computer (source) that is transferring the file to gaia.cs.umass.e
lesya692 [45]

Answer:

Explanation:

ae

5 0
3 years ago
In a new blank word document you can typing where ?
djyliett [7]
In the document...? Not sure what the question is.
8 0
3 years ago
Create a formula in the selected cell that multiplies the value in cell b2 of the current worksheet
Pachacha [2.7K]

To multiply two cells in Excel, use a multiplication formula like in the above example, but supply cell references instead of numbers. For example, to multiply the value in cell A2 by the value in B2, type this expression is A2*B2.

What do you under stand by Excel?

Microsoft's spreadsheet program Excel is a part of the Office family of products used for business purposes. Users can format, arrange, and compute data in a spreadsheet using Microsoft Excel.

To create formula in the selected cell follow these steps:

The PRODUCT function would be the quickest technique to multiply several cells or ranges.

Where number1, number2, etc. are numbers, cells or ranges that you want to multiply.

to multiply values in cells A2, B2 and C2, use this formula is PRODUCT(A2:C2)

To multiply the numbers in cells A2 through C2, and then multiply the result by 3,  is PRODUCT(A2:C2,3)

Learn more about Excel click on this:

brainly.com/question/25863198

#SPJ4

3 0
1 year ago
Por que es importante el audlamiento social en una pandemia por virus biológico
Mamont248 [21]

Answer:

Para ayudar a mantener a las personas informadas y actualizadas

(No hablo español usé el traductor de Google)

3 0
3 years ago
Plzzz help i need this today :(
Juliette [100K]

Answer:

C

Explanation:

8 0
3 years ago
Other questions:
  • Which of the following can be used to replace internal network addresses with one or more different addresses so the traffic tha
    9·1 answer
  • Write a loop that prints each country's population in country_pop. Sample output with input:
    7·1 answer
  • Which of the follow represents a form of disruptive technology? Tend to open new markets and destroy old ones A new way of doing
    11·1 answer
  • COMPUTER ORGANIZATION &amp; ARCHITECTURE I<br>please help need the correct answers to all
    6·1 answer
  • What are some differences between CUI and GUI ?
    7·1 answer
  • Which function will show 6 as the answer in the following formula<br><br> =_ (36)
    10·1 answer
  • When you build a computer from parts, you usually start by deciding on which processor and motherboard you will use?
    11·1 answer
  • Use the drop-down menus to complete statements about options for inserting video files.
    15·1 answer
  • Write a line of code that declares a variable called shipName and set it equal to the string SpaceX3000.
    9·1 answer
  • Kevin is a DJ and has a passion for creating and modifying audio tracks. Which application software facilitates him in his passi
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!