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
Most information security incidents will occur because of _________. Select one: a. Users who do not follow secure computing pra
nika2105 [10]

Answer:

Users who do not follow secure computing practices and procedures

Explanation:

Most data breaches that occur as a result of hacking and cyber-attacks get all the attention. However, the kind of mistakes that employees make in corporate situations can sometimes be very costly. Whether accidental or not, human error is the leading cause of most information security breaches. When you have proper policies, people working in big organizations, for instance, will know how they are to do with them. Organizations should put more effort on its employees. By ensuring that secure computing practices and procedures are followed, it will help guide the workforce more effectively.

4 0
3 years ago
In C++ :
elena-s [515]

Answer::

//Program is written in C++ Programming Language

// Comments are used for explanatory purpose

#include

#include

#include

#include

using namespace std;

int main(){

ifstream file; // File stream object

string name; // To hold the file name

string inputLine; // To hold a line of input

int lines = 0; // Line counter

int lineNum = 1; // Line number to display

// Get the file name.

cout << "Enter the file name: ";

getline(cin, name);// Open the file.

file.open(name.c_str());// Test for errors.

if (!file){

// There was an error so display an error

// message and end the PROGRAM.

cout << "Error opening " << name << endl;

exit(EXIT_FAILURE);

}

// Read the contents of the file and display

// each line with a line number.

// Get a line from the file.

getline(file, inputLine, '\n');

while (!file.fail()){

// Display the line.

cout << setw(3) << right << lineNum<< ":" << inputLine << endl;

// Update the line DISPLAY COUNTER for the next line.

lineNum++;// Update the total line counter.

lines++;// If we've displayed the 24th line, pause the screen.

if (lines == 24){

cout << "Press ENTER to CONTINUE...";

cin.get();

lines = 0;

}

// Get a line from the file.

getline(file, inputLine, '\n');}

//Close the file.

file.close();

return 0;}

8 0
3 years ago
Specialized vocabularyis known as:
svet-max [94.6K]

Answer:

<u>"Jargon"</u>

Explanation:

Great question, it is always good to ask away and get rid of any doubts that you may be having.

<em>Specialized vocabulary</em> is sometimes also known as <u>"Jargon"</u> . These are sets of words that are used specifically and uniquely for specific sets of groups or organizations.

For example Lawyers Judges and other law enforcement officials have their own Specialized vocabulary that are better understood by other people in Law enforcement, people that are not part of Law Enforcement might have a hard time understanding.

I hope this answered your question. If you have any more questions feel free to ask away at Brainly.

4 0
3 years ago
Create a cell reference in a formula by typing in the cell name or
il63 [147K]

Answer:

D. Clicking the cell

Explanation:

Clicking the target cell is an alternative way of typing in the cell name when creating a cell reference in a formula.

Hope this helps!

8 0
3 years ago
Read 2 more answers
The process that prepares a data model for implementation as a simple, nonredundant, flexible and adaptable database is known as
Vera_Pavlovna [14]

Answer:

The process that prepares a data model for implementation as a simple, nonredundant, flexible and adaptable database is known as

C) data analysis.

Explanation:

Data analysis is a process used in critically examining, evaluating data by using logical and statistical techniques.

Data analysis helps in the discovery of important information, data that can be used in the final decision making. the types of data analysis we have are:

*Prescriptive Analysis.

*Descriptive Analysis.

*Predictive Analysis.

*Diagnostic Analysis.

3 0
3 years ago
Read 2 more answers
Other questions:
  • Please help!
    6·2 answers
  • A c++ member function that uses, but does not change, the value of a member variable is called
    13·1 answer
  • For an activity with more than one immediate predecessor activity, which of the following is used to compute its earliest finish
    9·1 answer
  • Friedman (1999) argues that "we are wrong to base health promotion in all societies on a Western framework for human development
    11·1 answer
  • Please list ten things that you have learned an Excel Spreadsheet can do.
    7·1 answer
  • host b is sending an email intented for the user on host a to the mail server what protocol is being used to send the message
    10·1 answer
  • Who tryna play fortnite?
    5·2 answers
  • Python program oranges and apples 3.4.6 copy and paste would be nice
    7·1 answer
  • Need help with this, will give brainliest
    15·1 answer
  • What distinguishes Accenture as a holistic provider of Extended Reality (XR) services?.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!