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
When using a presentation software you can change the size of the text to...? Increase Font size, Decrease font size, increase t
ira [324]
Increase font size/ Decrease font size
7 0
2 years ago
Read 2 more answers
Which is a good way to improve your credit score
labwork [276]
Pay your bills and don't be late
8 0
3 years ago
Rate my dog out of ten give explanation why
Karolina [17]

Answer:

10/10

Explanation:

i love dogs. he's a super cute dog and i love him without even knowing him

7 0
3 years ago
What does Verizon child allow parents to do? My parents recently got the app and put it on my phone so I was wondering...
HACTEHA [7]
It allows them to turn on and turn off your internet; also if you were wondering incognito or any private browsing still countermeasures all devises they can use to access your history
4 0
3 years ago
What are the two access modes that are used when opening a file for input and output when pickling?
san4es73 [151]

The two access modes that are used when opening a file for input and output when pickling are rb and wb.

<h3>What is pickling?</h3>

Pickle is generally used in Python to serialize and deserialize a Python object structure. In other words, it is the act of transforming a Python object into a byte stream in order to save it to a file/database, maintain program state across sessions, or transport data over a network. By unpickling the pickled byte stream, the original object hierarchy can be recreated. This entire procedure is comparable to object serialization in Java or .Net.

When a byte stream is unpickled, the pickle module first makes an instance of the original object before populating it with the right data. To accomplish this, the byte stream only carries data relevant to the original object instance.

To learn more about python visit:

brainly.com/question/13437928

#SPJ4

8 0
1 year ago
Other questions:
  • It is a function that ends the connection to the database.
    9·2 answers
  • Of which of the following devices are point, drag, and click actions?
    15·1 answer
  • Why should you need to have skills and an understanding about programming?
    8·1 answer
  • In order for Dr. Reynolds to send a CPOE from her office computer system to the computer system at the local hospital, a/an ____
    5·1 answer
  • Which segment of society introduced the grunge look?
    5·2 answers
  • EXCEL 2016:
    8·2 answers
  • The system partition is the partition that contains the files required to load the operating system (bootmgr, and BCD). The syst
    9·1 answer
  • Ranboo back story? (not homework i just wanna find some ppl who are interested in the same things) ft. the reddie meme
    9·2 answers
  • Perceptron simplest definition
    14·1 answer
  • STM-1 contains 63 primary 2-Mbps data streams and each of them contains 30 time slots for speech.
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!