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
Leni [432]
3 years ago
12

Implement RandMultipByVal function, which gets one integervariable as its argument

Computers and Technology
1 answer:
Kitty [74]3 years ago
7 0

Answer:

#include <iostream>

#include <stdlib.h>

#include <time.h>

using namespace std;

void RandMultipByVal(int number){

   srand(time(NULL));

   int random = rand()%10+1;

   cout<<random*number;

}

int main()

{

 

  RandMultipByVal(4);

  return 0;

}

Explanation:

Include the three libraries, iostream for input/output, stdlib.h for rand() function and time.h for srand() function.

Create the function with one integer parameter.

Then, use srand() function. It is used to seed the rand() function or locate the starting point different in different time.

rand(): it is used to generate the random number between the range.

for example:

rand()%10  it gives the random number from 0 to 9.

if we add 1, then it gives from 1 to 10.

After that, multiply with parameter value and then print the result.

For calling the function create the main function and call the function with pass by value.

You might be interested in
The set of coordinating colors applied to backgrounds, objects, and text in a presentation is called:
Sonja [21]

Answer:

theme colors

Explanation:

As said, a group of colors that are used to format text and objects in a document. When you open the Color menu, these colors determine what you see.

3 0
3 years ago
Help me please and thanks
Yuri [45]

Answer:

b

Explanation:

6 0
4 years ago
What's a big question or problem in the tech field you'd like to solve and why?
aleksandrvk [35]

A big question or problem in the tech field that i would like to solve is Data security.

<h3>What is Data security ?</h3>

Data security  can be regarded as process of protecting data from unauthorized user as well as protection from  data corruption .

I will like to solve this problem because as advances in technology, the data of individual or organization is not been total secured and this is posing so much loss to individuals.

Data security are;

  • data encryption
  • hashing
  • tokenization

Learn more about Data security at;

brainly.com/question/17493537

5 0
2 years ago
True or false: you should reuse passwords on multiple websites because it will help you remember those passwords
Fudgin [204]

Answer: False

Explanation: Even though you can remember it is not really good because some hackers can track you passwords through those websites and could hack your account.

3 0
3 years ago
Read 2 more answers
Please answer no files !!
Pachacha [2.7K]

Answer:

im not exactly sure but i think its c

Explanation:

8 0
3 years ago
Other questions:
  • Blogs are typically written by large companies or organizations as a way to express formal, technical, or scholarly information
    5·2 answers
  • Given that a function receives three parameters a, b, c, of type double, write some code, to be included as part of the function
    9·1 answer
  • One of the ways to create a horizontal navigation menu from an unordered list is to a. set the display property of the element w
    6·1 answer
  • In a typical e-mail address, what is the "host"? A. an account designated by a user name. B. the computer that houses an Interne
    7·1 answer
  • Turning up the transmit power or utilizing a high gain antenna to reach wireless users from a distance increases your exposure t
    12·1 answer
  • Windows 1.0 was not considered to be a "true" operating system but rather an operating environment because _____.
    13·1 answer
  • Peace is a fruit of the Spirit that comes from _______ .
    11·1 answer
  • When an expression containing a ____ is part of an if statement, the assignment is illegal.
    14·2 answers
  • How to set Campaign goals?
    11·1 answer
  • Which operation is not efficiently supported by heaps?
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!