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
fomenos
1 year ago
7

Question 1

Computers and Technology
1 answer:
Fittoniya [83]1 year ago
8 0

Using the knowledge in computational language in C++ it is possible to write a code that generates and displays 10 random (integer) numbers between 0 and 50.

<h3>Writting the code in C++</h3>

<em>  class SecureRandom : Random</em>

<em>    {</em>

<em>        public static byte[] GetBytes(ulong length)</em>

<em>        {</em>

<em>            RNGCryptoServiceProvider RNG = new RNGCryptoServiceProvider();</em>

<em>            byte[] bytes = new byte[length];</em>

<em>            RNG.GetBytes(bytes);</em>

<em>            RNG.Dispose();</em>

<em>            return bytes;</em>

<em>        }</em>

<em>        public SecureRandom() : base(BitConverter.ToInt32(GetBytes(4), 0))</em>

<em>        {</em>

<em />

<em>        }</em>

<em>        public int GetRandomInt(int min, int max)</em>

<em>        {</em>

<em>            int treashold = max - min;</em>

<em>            if(treashold != Math.Abs(treashold))</em>

<em>            {</em>

<em>                throw new ArithmeticException("The minimum value can't exceed the maximum value!");</em>

<em>            }</em>

<em>            if (treashold == 0)</em>

<em>            {</em>

<em>                throw new ArithmeticException("The minimum value can't be the same as the maximum value!");</em>

<em>            }</em>

<em>            return min + (Next() % treashold);</em>

<em>        }</em>

<em>        public static int GetRandomIntStatic(int min, int max)</em>

<em>        {</em>

<em>            int treashold = max - min;</em>

<em>            if (treashold != Math.Abs(treashold))</em>

<em>            {</em>

<em>                throw new ArithmeticException("The minimum value can't exceed the maximum value!");</em>

<em>            }</em>

<em>            if(treashold == 0)</em>

<em>            {</em>

<em>                throw new ArithmeticException("The minimum value can't be the same as the maximum value!");</em>

<em>            }</em>

<em>            return min + (BitConverter.ToInt32(GetBytes(4), 0) % treashold);</em>

<em>        }</em>

<em>    }</em>

See more about C++ code at brainly.com/question/19705654

#SPJ1

You might be interested in
A small program that sends itself to other computers, rather than relying on user actions, is a
PSYCHO15rus [73]

Virus.

A virus is a malicious program or script that Spreads. 

Malware, however, will not spread. 

Viruses can spread without a victim's permission because it is automated to do so. 

For example, the Melissa virus would look like a file attachment that used reverse psychology to make you open it. From there, it goes through the first 50 email contacts stored on your computer and sends the virus to them from your computer. 
8 0
3 years ago
Intelligent automation expands on simpler forms of automation through the use of which technology?
Firlakuza [10]

Answer:

Intelligent Automation (IA) is a combination of Robotic Process Automation (RPA) and Artificial Intelligence (AI) technologies which together empower rapid end-to-end business process automation and accelerate digital transformation..

Explanation:

Hope it helps you..

Your welcome in advance..

(ㆁωㆁ)

3 0
2 years ago
Advantages and disadvantages of screen reading​
Vikki [24]

Explanation:

do u mean screen reading as in reading books in ur mobile ?

if so then disadvantage is the amount of eye strain u get staring into the screen

and advantage is the portability.

8 0
3 years ago
A user contacted the help desk to report that the laser printer in his department is wrinkling the paper when printed. The user
Ira Lisetskai [31]

Answer:

Option A and Option E are correct.

Explanation:

A user informed the call center to complain that their office's laser printer damages every paper while it is printed. The user well into the distribution tray reviewed those papers although it's glossy and wrinkle-free.

So the purpose behind it is that the paper doesn't reach the printer's specifications, or even when going thru the printer, the paper becomes moist.

8 0
3 years ago
What technology uses mathematical algorithms to render information unreadable to those lacking the required key
hoa [83]

Data encryption is the name of the technology that uses mathematical algorithms to render information unreadable to those lacking the required key.

<h3>What is Data encryption technology?</h3>

This is a technology that helps to secure data by applying a technique known as cryptography. What this basically means is that a secret code (or key) is generated which would provide access to the cryptographically stored information, and failure to provide the correct key makes the data or information unreadable.

You can learn more about how data encryption works here brainly.com/question/9238983

#SPJ1

6 0
2 years ago
Other questions:
  • Your desktop computer monitor is not displaying a picture. What would you do to troubleshoot the problem?
    7·2 answers
  • In which type of market do farmers sell their produce directly to village traders in rural areas?
    14·1 answer
  • How can I link two classes together with spigot to make it so I can open a method within the said class. Trying to open my class
    13·1 answer
  • In the value chain concept, upgrading IT is considered what kind of activity?
    9·1 answer
  • Which key should you press and hold to select multiple cells?
    8·2 answers
  • Which of the following is NOT one of the four steps preparing for sales forecast ?
    10·1 answer
  • By default the normal style inserts a vertical space equal to _____ lines between each line of text
    9·1 answer
  • Pleassseeeee helppp!!!!
    7·1 answer
  • Raw materials have two basic types what are the 2?
    11·2 answers
  • a functional policy declares an organization's management direction for security in such specific functional areas as email, rem
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!