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]
4 years ago
13

Write the proghrams for the following:

Computers and Technology
1 answer:
belka [17]4 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
What determines the number of times that a condition-controlled loop will repeat?
Tcecarenko [31]

Answer:

the binary

Explanation:

5 0
3 years ago
Read 2 more answers
You are manually configuring a tcp/ip host. another administrator gives you the router's ip address. what is the tcp/ip term for
Nuetrik [128]
Answer: Default Gateway address
5 0
4 years ago
Read 2 more answers
Explain Software licensing
lbvjy [14]

Answer:

Software Licensing is pretty much allowing another company to use your own product.

Explanation:

<u>For Example:</u>

<u>Company A</u> is working on a face swap application which requires a facial recognition software in order to work. They can either build one from scratch (which can take months) or they can pay someone who already has one in order to be able to use it.

<u>Company B</u> owns a facial recognition software and are asked by Company A to license their software to them. Company A pays Company B, they then draft up a contract for Company A allowing them to use the facial recognition app.

Software licenses are either proprietary, free, or open source. Proprietary is the one used in the example above.

I hope this answered your question. If you have any more questions feel free to ask away at Brainly.

5 0
3 years ago
Write a program called DeliveryCharges for the package delivery service. The program should use an array that holds the 10 zip c
Vlad [161]

Answer:

import java.util.Scanner;

public class DeliveryCharges

{

public static void main(String[] args) {

 

       String[] zips = {"01234", "11234", "21234", "31234", "41234", "51234", "61234", "71234", "81234", "91234"};

    double[] prices = {2.2, 1.0, 3.6, 6, 9, 7.1, 0.8, 4.7, 3.3, 5.2};

    int index = -1;

    Scanner ob = new Scanner(System.in);

    System.out.print("Enter the zip code for your delivery: ");

    String zip = ob.next();

   

    for (int i=0; i<10; i++) {

        if (zip.equals(zips[i])) {

            index = i;

        }

    }

       

    if (index!= -1)

       System.out.println("Delivery charge to " + zips[index] + " is: " + prices[index]);

    else

       System.out.println("No delivery to " + zip);

}

}

Explanation:

Initialize the zips and prices

Initialize index that represents the index of the zip code. If the entered zip code is in the array

Ask the user to enter the zip code

Create a for loop that iterates through the zips. If the entered zip is in the zips, set its index to index

When the loop is done, check if the index. If the index is not -1, that means zip code was found in the zips array, print the corresponding price from the price array. Otherwise, print no delivery for the entered zip code

8 0
4 years ago
Evan is borrowing a friend's laptop to check out some groovy music files. What can Evan look for to quickly identify
Yuki888 [10]

Answer:

The answer to this question is given below in the explanation section.

Explanation:

The correct option for this question is the file extension. Because, by knowing the file extension, you can easily understand and know what the file is. If Evan checking out some groovy music files then he will definitely look at the file format to know that is it the music file or not.

Other options are not correct because:

messaging app function is to send the message, receive and store the message while hardware does not have any relation to identifying the music file and system software is an example of an operating system that also does not help the Evan for looking at music file on the laptop.

7 0
3 years ago
Other questions:
  • • Describe the steps in detail that the operating system performs to handle interrupts, including ISRs, the stack, and hardware?
    5·1 answer
  • This toolbar has icons representing the application's basic operations such as Save and Copy. Drawing Formatting Standard Task
    11·2 answers
  • Define the missing method. licenseNum is created as: (100000 * customID) + licenseYear. Sample output: Dog license: 77702014
    14·1 answer
  • Why is internet safety important
    14·2 answers
  • Are scripted languages easier or more difficult to port than programming languages? Why?
    6·1 answer
  • A junior network administrator tells you that he can ping a DNS server successfully using its IP address, but he has not tested
    11·1 answer
  • Which term describes the gallery that allows you to customize and format text as a graphic? Pull Quote Text Box WordArt Drop Cap
    13·2 answers
  • Wassup anybody tryna play 2k
    6·2 answers
  • Write a C console application that will be used to determine if rectangular packages can fit inside one of a set of spheres. You
    5·1 answer
  • If your earning potential is higher than the cost of your higher education,<br> you will have a
    8·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!