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
Algorithm And flowchari to caculate the area of square​
GenaCL600 [577]

Answer:

Send the question first.

6 0
3 years ago
Write a statement that declares a PrintWriter reference variable named output and initializes it to a reference to a newly creat
dusya [7]

Answer:

PrintWriter variable = new PrintWriter("output.txt");

Explanation:

There are two ways of declaring a reference variable in programming.

One way is

Reference Variable-name = new Reference ("some texts here");

While the other is

Reference Variable-name;

Variable-name = new Reference ("some texts here");

Both ways are valid ways of reference variable declaration.

In the question above, the reference is PrintWriter, it points to output.txt and the question says "write a single statement";

Hence, we make use of

PrintWriter variable = new PrintWriter("output.txt");

A reference variable is declared to be of a specific type and that type can never be changed.

5 0
3 years ago
This is a type race kindly join.
xeze [42]

Answer:

NO THANKS FOR THAT I WILL NOT JOIN

8 0
3 years ago
Describe five ways in which Process Explorer (procexp) can be used in computer forensics as part of an investigation
nataly862011 [7]

Answer:

 The process explorer is mainly used for tracking the actual problems in the system. Process explorer is also known as proc-exp and it is also used as system monitoring where it monitor the microsoft window that are typically created by the SysInternals.  

The following are the five ways in which the proc-exp (Process explorer) are used in the computer forensics for the purpose of investigation are:

  • The process explorer mainly provide the various types of functionality to the task manager for monitoring the system properly.
  • It basically used in the system for tracking the main problems.
  • It used in computer forensics for tracking the system problems and it give the detail information about the system memory also.
  • It keeps track all the virus and malicious software in the computer system.
  • It helps for investigation purpose as by using the process explorer we can get all the information about the particular computer system and software.  

4 0
2 years ago
Which file extension indicates the file is a Microsoft Word document?
Ivan

the answer to your question is ".docs"

3 0
3 years ago
Other questions:
  • When activated, an Excel object has all the features of an Excel
    8·2 answers
  • Indenting the start and finish of segments
    8·2 answers
  • Jasmine is writing a shopping app. She has created a variable to keep track of the number of items in the shopping cart. Everyti
    11·1 answer
  • ) Briefly describe the purpose of the DASH protocol in streaming videos.
    9·1 answer
  • Forms often allow a user to enter an integer. Write a program that takes in a string representing an integer as input, and outpu
    11·2 answers
  • What error occurs in the following program? #include using namespace std; int main() { int number1, number2, sum; cout &lt;&lt;
    13·1 answer
  • How Can I add a image in an HTML program?​ please tell
    6·1 answer
  • Create a two functions: first called grocery_cost(food), where food can be one item or a list of items from the stock and price
    7·1 answer
  • Why does my smoke detector keep beeping even after i change the battery?.
    14·1 answer
  • What is the descriptor for a filter that warns or blocks you from potentially fraudulent or suspicious websites?.
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!