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
When do you need to use a fully qualified url in a hyperlink?
Rudiy27
When you're linking to another web site.
7 0
3 years ago
a document contains a list of items that appear in no particular order. what is the best way to format the list
krok68 [10]

Answer:

bulleted list

Explanation:

8 0
3 years ago
When a user first authenticates with a Kerberos-based server, he/she will receive _________ Group of answer choices a ticket-gra
Reil [10]

Answer:

a ticket-granting-ticket which asserts the authenticity of the user's credentials to other network resources.

Explanation:

Kerberos is an authentication protocol designed to ensure security when communicating over a public or non-secure network by using symmetric key cryptography.

When a user first authenticates with a Kerberos-based server, he/she will receive a ticket-granting-ticket which asserts the authenticity of the user's credentials to other network resources.

3 0
4 years ago
John wants to share resources and move a large volume of data quickly over the Internet. John should use which of the following
den301095 [7]
John should use FTP Services.

For John to quickly transfer a large volume of data, he should have use FTP (File Transfer Protocol). FTP is the network protocol commonly used for exchanging files over the internet. There are a lot of software applications for file share transfer such as FileZilla and SmartFTP.
6 0
4 years ago
A network on the internet has a subnet mask of 255.255.240.0. what is the maximum number of hosts it can handle
Lera25 [3.4K]
It is a class B network, so for a class B network, the upper 16 bits form the network address and the lower 16 bits are subnet and host fields. Of the lower 16 bits, most significant 4 bits are 1111. This leaves 12 bits for the host number. So, 4096(2^12) host address exists. First and last address are special so the maximum number of address is 4096-2=4094.
7 0
4 years ago
Other questions:
  • When a typist changes from a conventional typewriter to a word processor, his typing schema will have to _____ to incorporate th
    12·1 answer
  • What is "social
    13·2 answers
  • 4. How does distance affect the strength of the force of gravity?_
    5·1 answer
  • What is the meaning of website cookies? brief explanation ​
    9·2 answers
  • A(n) _________ is a formal access control methodology used to assign a level of confidentiality to an information asset and thus
    6·1 answer
  • Which step is done first to replace existing text in a text box?
    10·2 answers
  • Assignment 1 is to write a program that will write the lyrics to "X number of beers on the wall". Use only the main method. Prom
    11·1 answer
  • What does it mean to catch an exception?
    8·1 answer
  • Create a presentation on “Pets” and customize your presentation in the following ways:
    10·1 answer
  • It is a type of web page that allows you to share your ideas experiences and beliefs
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!