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
Tom [10]
3 years ago
13

Write the proghrams for the following:

Computers and Technology
1 answer:
belka [17]3 years ago
5 0

Answer:

a)

#include <iostream>

using namespace std;

int main() {

   bool a,b,c;

   cin>>a>>b;

   if(a^b)//X-OR operator in C++.

   c=true;

   else

   c=false;

   cout<<c;

return 0;

}

b)

#include <iostream>

using namespace std;

int main() {

   bool a,b,c,d;

   cin>>a>>b>>c;

   if((a^b)^c)//X-OR operator in C++.

   d=true;

   else

   d=false;

   cout<<d;

return 0;

}

Explanation:

The above written programs are in C++.There is an operator (^) called X-OR operator in C++.It returns true if the number of 1's are odd and returns false if the number of 1's are even.

In the if statement I have user X-OR operator(^) to find the result and storing the result in another boolean variable in both the questions.

You might be interested in
Maria needs to use a requirement-gathering method that will help her provide a set of questions to the client. Which method shou
blondinia [14]

Answer:

C

Explanation:

As I can see Maria needs to use a method that will help her provide a set of questions to the client so I'm sure she will need a questionnaire

5 0
1 year ago
What is the name of the arm that is attached to the read/write head?
lawyer [7]
This is not making sense?
7 0
2 years ago
The fractional_part function divides the numerator by the denominator, and returns just the fractional part.
Alinara [238K]

Answer:

a. True

Explanation:

The fractional_part function divides the numerator by the denominator, and in turn returns just the fractional part, which is usually a number between 0 and 1.

When the denominator is 0, it produces an error result, instead of attempting the division, the function can be programmed to return "Math Error: cannot be divided by zero", as shown in the following Python code;

def fractional_part(numerator, denominator):

if denominator == 0:

 return "Math Error: cannot be divided by zero"

return (numerator % denominator)/denominator

6 0
2 years ago
1. provide at least 3 properties and 3 methods of the object computer.
ValentinkaMS [17]

Answer:

The answers to these questions are given below in the explanation section.

Explanation:

The following are 3 properties and 3 methods of the object computer.

Solution

Properties:

  1. computer name;
  2. computer model;
  3. computer color;
  4. computer manufacturer

Methods:

  1. Turn on/off
  2. Do Wordprocessing
  3. Connect Keyboard/Mouse
  4. Charging
  5. Play sound

The following are 3 properties and 3 methods of the object computer.

Properties:

  1. Car Model;
  2. Car Manufacturer;
  3. Car Color

Methods:

  1. Car Run (Speed)
  2. Change Gear
  3. Open/Close Door
  4. Turn on/off

7 0
3 years ago
Mr. Yang is a doctor who regards video games as an effective means of staying fit. What type of game would he recommend to his p
morpeh [17]

Answer:

D. An exergame

Explanation:

It is because the exercise game is the suitable game to staying fit. For example wii video game able to give the similar experience to outdoor activities such as playing tennis, kick boxing etc.

8 0
2 years ago
Read 2 more answers
Other questions:
  • What is the primary criticism against a national identification system based on biometric data?
    13·1 answer
  • Which key on a laptop keyboard is often used to help pair a mobile device with another device for communication purposes?
    12·1 answer
  • How do you think your ability to work might be affected if you don’t magnify a document so that text is at a size for you to rea
    9·1 answer
  • Troubleshooting comes before diagnosing. Answer: false
    7·1 answer
  • Holly Carpenter argues that technology may actually prevent some kinds of evolution that would benefit humans. Do you agree with
    8·2 answers
  • A technician needs to boot a PC from a USB drive.
    5·1 answer
  • What is the output?
    13·1 answer
  • After turning on your computer ,it prompts you to type a password to continue the boot process. However ,you forgot the password
    10·1 answer
  • ¿Cuál es la función que cumplía los sofistas y Porque eran tan importantes?​
    13·1 answer
  • Computer in education are used for teaching and learning aids​
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!