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
cluponka [151]
3 years ago
9

Create an application that writes a series of random numbers to a file. Each random number should be in the range of 1 through 1

00. The application should let the user specify how many random numbers the file will hold and should use a SaveFileDialog control to let the user specify the file’s name and location.
Computers and Technology
1 answer:
natali 33 [55]3 years ago
8 0

Answer:

The following code is written in C# programming language:

private void saveButton_Click(object sender, EventArgs e)

       {

               StreamWriter usersFile;

        int randomNumberAmount =int.Parse(inputTextBox.Text.ToString());;

               int randomNumber = 0;

               int count = 1;

               while (count <= randomNumberAmount)

               {

                   Random rand = new Random();

                   randomNumber = rand.Next(100) + 1;

                   count++;

               }

               if (saveFile.ShowDialog() == DialogResult.OK)

                   {

                       usersFile = File.CreateText(saveFile.FileName);

                       usersFile.WriteLine("Random Number " + count + "is: " + randomNumber + "\r\n");

                   }

                   else

                   {

                       MessageBox.Show("Operation cancelled!");

                   }

              }

Explanation:

Here, we define a class, then we create an object of the StreamWriter.

Then, we create three integer variable and initialize the value init.

Then, we set the while loop and pass the condition.

Then, we set the if condition and check the condition and create following body init.

Then, we create the else part of the if condition.

You might be interested in
Compare the current in two lightbulbs wired in a series circuit
julia-pushkina [17]
<span>The current flow in two light bulbs wired in a series circuit is identica</span>
7 0
3 years ago
What types of information are commonly included in headers and footers? Check all that apply.
polet [3.4K]
Date
Page number
File path and file name
3 0
3 years ago
Besides technical skill, what is the most important factor for staying employed and being offered promotions?
Natali [406]

Obtaining a college degree= while this is nice, you can get a lot of placed with just a GED or Highschool Degree

pursuing self-directed learning=this will help you

showing professional behavior= yes this helps a lot

setting long-term goals= this could help you in the end game

Overall, i think it would be between B and C, though C sounds correct over B because even if you pursue self directed learning, you could still get fired or quit or not get a promotion.

3 0
3 years ago
Read 2 more answers
The accounting department moved its network-attached printer from one side of the office to a more centralized location, making
Blababa [14]

Answer:

The cable run connecting the new keystone jack to the patch panel is bad.

The patch panel connector for the new location's cable run is not connected to a switch.

Explanation:

The cable run connecting the new keystone jack to the patch panel is bad.

The patch panel connector for the new location's cable run is not connected to a switch.

5 0
4 years ago
When using linear or reciprocal navigation, what should be the interface include?
Alex_Xolod [135]
The answer to the question is A
5 0
4 years ago
Other questions:
  • Amy has decided to use a dark background and light colored text for her prensentation. Which toolbar option will let her change
    5·1 answer
  • It is a function that ends the connection to the database.
    9·2 answers
  • Which method can help you prevent RSI while using a keyboard?
    14·1 answer
  • Explain in three to four sentences what happens to data packets once they leave a node.
    11·2 answers
  • What are some (free) good animation websites (for PC/Microsoft) for a short informational video about homelessness?
    15·1 answer
  • SUMMING THE TRIPLES OF THE EVEN INTEGERS FROM 2 THROUGH 10) Starting with a list containing 1 through 10, use filter, map and su
    7·1 answer
  • Por favor alguem poderia me falar qual PC e melhor: Computador Gamer Fox PC FPS Intel Core i5 8GB (GeForce GTX 1050Ti 4GB GDDR5)
    15·1 answer
  • A label control may be added to a form by double-clicking on the Label control icon in the ________ window.
    15·1 answer
  • PLEASE HELP!! WILL MARK BRAINLIEST!!
    15·1 answer
  • Please choose odd one out please tell fast​
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!