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
What is 11100111 to decimal form?
Westkost [7]

Answer:

231

Explanation:

8 0
2 years ago
Read 2 more answers
Why would a business consider using virtual machines?
Nuetrik [128]
The answer is A, or To be able to maintain servers remotely. Why? Well, a business would not want to allow outside customers access to files because that’s a blatant red flag. There would be no reason to completely eliminate physical servers because there simply isn’t a reason to. They would not want to secure the company intranet because if they did, their solution would not be to use virtual machines surely.

Your final answer: To be able to maintain servers remotely. It’s slightly more efficient, and it makes sense for the company to be accomplishing this goal by using virtual machines.
7 0
2 years ago
Help me pleaseeee!!!!!
belka [17]

Answer:

15 unit square

Explanation:

7 0
3 years ago
Read 2 more answers
Darren wants to substitute every occurence of the word bulky in his spreadsheet with the word strong. which of these options sho
Kaylis [27]
If you wanted to remove all the occurrences of bulky and replace them with the word strong. You would use replace all.
6 0
3 years ago
Which process alters readable data into unreadable form to prevent unauthorized access known as?
EleoNora [17]
Encryption. Using a secret key, the data is encrypted. To decrypt it, the same or a different key is needed. Unauthorised entities should not have such a key.
3 0
4 years ago
Other questions:
  • While at work, Joe asked Dana to show him how to change the copier paper. Joe kept working as she explained the process, and the
    5·2 answers
  • A ________ separates traditional voice telephone transmission from the data transmissions in the equipment located at the custom
    11·1 answer
  • Print a countdown from n to 1 The function below takes one parameter: an integer (begin). Complete the function so that it print
    8·1 answer
  • What does it mean to empty the cache?
    6·1 answer
  • How do you use a iPad when it has a password ?
    9·2 answers
  • Which of the following is the best way to locate books and research from all over the United States and abroad?
    9·2 answers
  • Tech Town has been hit with a bad storm and the town is suffering from severe flooding. The kids have no way to get to school.Te
    7·1 answer
  • The one who will defeat me in this typing race I will mark the one brainliest:
    5·2 answers
  • a deque is a type of collection,but it is not automatically available when you open IDLE. What is missing that allows you to use
    14·2 answers
  • Choose the correct color to complete the sentence.
    15·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!