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
Complete the sentence.<br><br> A ___________search can be done on a list that is not ordered.
adelina 88 [10]

Answer:

Well, a binary search has to be ordered. So ima just say linear search..

Explanation:

I think its linear..

3 0
3 years ago
Read 2 more answers
________ are typically comprised of a mix of ________ and ________.
zaharov [31]
Your answer is "Mutual funds; stocks; bonds".
8 0
3 years ago
Read 2 more answers
What are the third generation of computer?​
balu736 [363]

The period of third generation was from 1965-1971. The computers of third generation used Integrated Circuits (ICs) in place of transistors. A single IC has many transistors, resistors, and capacitors along with the associated circuitry. The IC was invented by Jack Kilby.

3 0
3 years ago
Read 2 more answers
When starting a computer running Windows Vista, a technician sees that the error message "BOOTMGR is missing" appears after the
docker41 [41]

Answer:

B and C

Explanation:

Possible solution to solving "BOOTMGR is missing" error in Windows Vista is to use the Windows Recovery Environment.

Another option is to run "bootrec/fixboot" command from the comman prompt and the command prompt is also accessible from the windows recovery environment.

8 0
3 years ago
Your computer uses 4 bits to represent decimal numbers (0, 1, 2, 3 and so on) in binary. What is the SMALLEST number for which a
Bad White [126]

Answer:d

Explanation:

8 0
3 years ago
Other questions:
  • Discuss 2D gameplay and how new platforms such as cell phones are taking advantages of this renewed market
    5·1 answer
  • Which Internet resource can you use to publicly describe an adventure trip you recently made?
    9·1 answer
  • Write a Python function merge_dict that takes two dictionaries(d1, d2) as parameters, and returns a modified dictionary(d1) cons
    5·1 answer
  • This type of peripheral is used to interact with, or send data to, the computer.
    12·2 answers
  • __________ is a protocol used by e-mail clients to download e-mails to your computer.
    14·1 answer
  • The enhanced for statement allows you to iterate through the elements of an array or a collection without using a counter. Give
    10·2 answers
  • When you print ____, the presentation is printed with one or more slides on each piece of paper?
    11·1 answer
  • Fuction table of JK-Flip flop?
    11·1 answer
  • Fill in the Blank
    10·2 answers
  • A form of segmentation that is based on user usage rate, user status, purchase occasion, and benefits sought is _________.
    13·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!