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
Question 2 of 10
NeTakaya

Answer:

D.

Because you said it was.

3 0
2 years ago
I need help for my computer science class I would appreciate it
kirill115 [55]

Answer:

21

Explanation:

a = 7

b = 7

c = 2

7 is greater than or equal to 7 , so it will return 7 + 7 *2 which is 21

5 0
2 years ago
How many nibbles make one kilobyte​
Kazeer [188]
2000 nibbles I think correct me if I’m wrong
5 0
2 years ago
Read 2 more answers
What are html documents also called?
11Alexandr11 [23.1K]
HyperText Markup Language
4 0
3 years ago
A network administrator notices that some newly installed Ethernet cabling is carrying corrupt and distorted data signals. The n
MakcuM [25]

A network administrator notices that some newly installed Ethernet cabling is carrying corrupt and distorted data signals. The new cabling was installed in the ceiling close to fluorescent lights and electrical equipment

Two factors may interfere with the copper cabling and result in signal distortion and data corruption are :

EMI

RFI

Explanation:

  • EMI (electromagnetic interference) is the disruption of operation of an electronic device when it is in the vicinity of an electromagnetic field (EM field) in the radio frequency (RF) spectrum that is caused by another electronic device.
  • During EMC testing, radiated emissions measurements are made using a spectrum analyzer and or an EMI receiver and a suitable measuring antenna.
  • EMI (Electromagnetic Interference) is also called RFI (Radio Frequency Interference).
  • Conducted RFI is unwanted high frequencies that ride on the AC wave form. Radiated RFI is emitted through the air. There are many pieces of equipment that can generate RFI, variable frequency drives included.
  • The internal circuits of personal computers generate EM fields in the RF range.
3 0
3 years ago
Other questions:
  • Create a program that reads words.txt (link near top of our home page) in order to: determine the length of the longest word(s)
    14·1 answer
  • A motherboard has four DIMM slots; three slots are gray and the fourth is black. What type of memory is this board designed to u
    6·1 answer
  • For which of the following careers is technology’s connectivity factor most important?
    13·2 answers
  • How can an administrator make only the files and folders to which a user has at least Read permissions visible?
    13·1 answer
  • There is a simple pattern for derermining if a binary number is odd. What is it and why does this pattern occur?
    8·1 answer
  • Translation of a file into a coded format that occupies less space than the original file is called
    15·1 answer
  • Using this tool to help you to visualize your slides and develop your content
    13·1 answer
  • The type of medium used to hide data in steganography is referred to as __________. This may be a photo, video, sound file, or V
    12·2 answers
  • Determine whether the phrase below is a sentence or a fragment.
    12·1 answer
  • Write a program that reads in 10 numbers and displays the number of distinct numbers and the distinct numbers in their input ord
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!