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
Serga [27]
2 years ago
5

b. Write a complete program for the following situation related to setting the speed of a car to preset values before starting a

journey: • If speed is less than lower_ set_ speed, display the message "accelerate" to the screen, increase the car's speed to the lower set speed, and output the new speed to the screen. • If speed is greater than upper_set_speed, print the message "apply brake" to the screen, decrease the car's speed to the upper set speed, and output the new speed to the screen. • Give all necessary documentation in the comments, including the file name. • Allow the program to exit at the end. • Output the speed to the screen. • How many different initial speeds will you need to test this code?
Computers and Technology
1 answer:
Orlov [11]2 years ago
3 0

Answer:

U will need 4

Explanation:

You might be interested in
What are the groups located within developer tab? check all that apply.
deff fn [24]

Answer:

controls, code, protect, and add-ins!

Explanation:

edge 2021

6 0
2 years ago
Maria wants to create an image for a Web page. Maria should use _____. help me
Inessa [10]
Graphics software
Hope it helps
8 0
3 years ago
Read 2 more answers
Suppose a variable is passed By Value to a parameter of a Sub procedure, and the parameter has its value changed inside the Sub
algol [13]

Answer:

"The value of the variable will remain the same which is already have when the sub-processor is called".

Explanation:

The above question said that:-

void fun(int a)

{

  a=a+1;

}

void main()

{

  int a=5;

  fun(a);

}

//what will be the value of a in the main function after the fun function is excuted.

  • Then the answer is: the value of a will be 5 in the main function.
  • It is because when the fun function is called, then a variable that is defined in the fun function is a local variable for fun function. That scope after the fun function is null.
  • The a variable inside the fun function is a different variable and the main function a variable is also a different variable.
  • So when the user prints the value of a variable inside the fun function, it will give the result as 6.
  • But when he prints the value of a variable inside the main function, then it will give the value as 5.
4 0
3 years ago
Consider an improved version of the Vigen ere cipher, where instead of using multiple shift ciphers, multiple mono-alphabetic su
anzhelika [568]

Answer:

Kasiski’s method for determining 't' works for Vigenère cipher as well. The only difference is therefore in the second stage of the attack. In the second stage, one needs to build a frequency table for each of the 't' keys, and carry out an attack like on the mono-alphabetic cipher. Given a long enough plaintext, this will work successfully.

Explanation:

Kasiski method is a method of attacking polyalphabetic substitution ciphers such as Vigenère cipher. It is also called Kasiski test or Kasiski examination.

The method involve finding the length of the keyword and then dividing the message into that many simple substitution cryptograms. Frequency analysis could then be used to solve the resulting simple substitution.

6 0
3 years ago
Write a statement that defines an ifstream object named inputFile and opens a file named "Friends.txt".
Simora [160]

Answer:

ifstream inputFile;

inputFile.open("Friends.txt");

Explanation:

Though, the programming language is not stated, questions like this are often from C++.

The first statement defines the ifstream object using the following syntax.

ifstream [object_name]

In this case, the object name is inputFile

So, the syntax becomes

ifstream inputFile;

The next line opens a file using the following syntax.

[object_name].open("Filename")

Here, object_name is inputFile and filename is Friends.txt

So, the open statement becomes

inputFile.open("Friends.txt")

5 0
2 years ago
Other questions:
  • What do you observe on the filter paper strip after 2 to 3 hours?
    8·2 answers
  • Ming is building an inexpensive computer to use for her online classes, and needs to purchase Windows. What is the most cost-eff
    8·1 answer
  • Hanging out with friends, watching your favorite TV show, and buying a pair of new shoes are all examples of _____ for doing wel
    5·2 answers
  • Write a basic program that performs simple file and mathematical operations.
    6·1 answer
  • What happens when a filter is applied to a database
    15·1 answer
  • What happens to a mechanical system when two opposing torques do not cancel out?
    7·1 answer
  • I wrote a program to calculate how many unique students I have taught over the years. It will read in a file formatted with firs
    5·1 answer
  • The field names in a database are also known as__?
    12·2 answers
  • What is the suffix of hollow?
    7·1 answer
  • Identify a characteristic that is a disadvantage of cloud-based hosting.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!