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
4vir4ik [10]
3 years ago
10

Write a statement that toggles the value of the bool variable onoffswitch. that is, if onoffswitch is false , its value is chang

ed to true ; if onoffswitch is true , its value is changed to false .
Computers and Technology
1 answer:
choli [55]3 years ago
8 0
You should state the language you're using in these types of questions; here's an example in C++.

bool onOff = true;
if (onOff)
onOff = false;
else
onOff = true;
You might be interested in
A manufacturer of machine tools creates a spreadsheet of tools and the cost for those. The spreadsheet has four fields: name of
iragen [17]

The question above has multiple answers:


<span>1.       </span>Sort the data in the field "name of the tool" in ascending order alphabetically.

<span>2.       </span> Sort the data in the field “number of tools” in ascending order.

<span>3.       </span>Sort the data in ascending order of cost per tool.

<span>4.       </span>Sort the data in ascending order of total cost.

The answer is 3. Sort the data in ascending order of cost per tool


You can always make your spreadsheet work a bit more organized by sorting your data. In this case, what is required from the manufacturer of the tools is to sort the data so that someone else is able to find out which tool costs the most. Basically, the price of the tool which is the highest is required to be known. Therefore, the manufacturer of the tools should Sort the data in ascending order of cost per tool.






3 0
3 years ago
Mad Libs are activities that have a person provide various words, which are then used to complete a short story in unexpected (a
Marina86 [1]

Answer:

I am writing a C++ and JAVA program.    

import java.util.Scanner; //for using input output functions

public class LabProgram { // class name

public static void main(String[] args) {//start of main function body

Scanner input = new Scanner(System.in);

// creates input instance of  Scanner type

     String str;  // declares String type variable str for a string value

     int num;  // declares integer type variable num to hold an integer value

     str = input.next(); //scans and reads input string from user

     num = input.nextInt();  //scans and reads input integer from user

//while loop continues to execute until user enters quit 0

while(str!="quit" && num!=0) {  

/* prints the following message, for example if value of num = 2 and value of str = apples then the following print statement prints Eating 2 apples a day keeps the doctor away. */

System.out.println("\nEating " + num +" " + str + " a day keeps the doctor away.");

//takes string and integer as input again and keep taking input until user //enters quit 0

str = input.next();  

num = input.nextInt(); }   } }

Explanation:

The program is well explained in the comments mentioned with each statement of the program. The program simply prompts user to enter a string and an integer. The while loop keeps executing until user enters quit 0. The program keeps taking input string and integer from user and prints the message System.out.println("\nEating " + num +" " + str + " a day keeps the doctor away.");  The loop breaks when the use enters quit 0. The screenshot of the program along with its output is attached.

3 0
3 years ago
The ability for a protocol or program to determine that something went wrong is known as_________.
777dan777 [17]

Answer:

The correct answer to the following question will be Error-detection.

Explanation:

Error-detection: The detection of errors caused during the transmission from the transmitter to the receiver by damage and other noises, known as Error-detection. This error-detection has the ability to resolute if something went wrong and if any error occurs in the program.

There are mainly three types of error-detection, these types can be followed:

  • Automatic Repeat Request (ARQ)
  • Forward Error Correction
  • Hybrid Schemes

There are two methods for error-detection, such as:

  • Single parity check
  • Two-dimensional parity check

4 0
3 years ago
Which of these is system software? Check all
Darya [45]

Answer:

Windows OS is software....

6 0
3 years ago
A. Write a program that asks the user to enter an integer, then prints a list of all positive integers that divide that number e
kobusy [5.1K]

Answer:

Following are the program in python language the name of the program is factors.py

num= int(input("Please enter a positive integer: "))#Read the number by user

print("The factors of ",num,"are:")

for k in range(2,num): #iterating over the loop

   if(num%k==0): #checking the condition

       print(k)#display the factor

Output:

Please enter a positive integer: 12

The factors of 12 are:

2

3

4

6      

Explanation:

Following are the description of the program

  • Read the number by user in the "num" variable
  • Iterating the for loop from k=2 to less then "num".
  • In the for loop checking the factor of "num"  variable by using % operator.
  • Finally display the factor by using print function
4 0
3 years ago
Other questions:
  • Suppose a computer can execute 1 billion instructions/sec and that a system call takes 1000 instructions, including the trap and
    10·1 answer
  • Driving while wearing headphones or earphones
    12·2 answers
  • A star appears under the <br> menu of the word processing program.
    5·1 answer
  • The minimum spanning tree of an undirected graph G exists if and only if G is connected. True or False?
    12·1 answer
  • A ____ is a statement specifying the condition(s) that must be true before the function is called.
    6·1 answer
  • How has technology effected the way we communicate?
    5·1 answer
  • Using a tag, set the color to orange for all tags
    13·2 answers
  • What model involves the creation of data and process models during the development of an application
    14·1 answer
  • What are two differences between a wide angle lens and a telephoto lens?
    5·2 answers
  • a) pencil b) ink bottle c) polygon d) eye 3. Under which of the following can an operating system be classified? b) software c)
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!