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
Vera_Pavlovna [14]
3 years ago
11

Write a single if-test using Boolean operators and relaional operators to determine if a double variable x is between zero (excl

usive) and one (inclusive). Print a message indicating that x is between zero and one inclusive. Use deMorgan’s law to show the complement of the previous if-test. Simplify the complement statement so there is no "!" in your final if-test statement. 5. In the following questions, assume Boolean values have been assigned to A, B, and C as follows: boolean AA = true; boolean BB = false; boolean CC = true; Indicate what is printed by each statement: System.out.println( ((AA && BB) || (AA && CC)) ); System.out.println( ((AA || !BB) && (!AA || CC) ); 6. Write a program to determine if an input integer is an even number or odd number. 7. How can the effect of the following program fragment best be described? if (x > y) z = x; if (x == y) z = 0; if (x < y) z = y; a. The smaller of x and y is stored in z. b. The larger of x and y is stored in z. c. The larger of x and y is stored in z, unless x and y are equal, in which case z is assigned 0. d. The larger of x and y is stored in z, unless x and y are not equal, in which case z is assigned 0. e. None of the above.
Computers and Technology
1 answer:
Dahasolnce [82]3 years ago
3 0

Answer:

The following are the solution to this question:

Explanation:

In the given question multiple questions have been asked about, that is defined as follows:

#include<iostream>//defining header file

using namespace std;

int  main()//defining main method

{

  double x1;//defining double variable

  cout<<"enter value: ";//print message

  cin>>x1;//input value from the user-end

  if(x1>0 && x1<=1)//use boolean operators

  {

      cout<<"x is between zero and one";//print message

  }

  return 0;

}

Output:

enter value: 1

x is between zero and one

5)

public class Main//defining a class main

{

public static void main(String[] args) //defining main method

{

       boolean AA = true; //defining boolean variable  

       boolean BB = false;//defining boolean variable  

       boolean CC = true; //defining boolean variable

      if ((AA && BB) || (AA && CC)) //defining if block to check value

      {

         System.out.println("True");//print message

      }

      if ((AA || !BB) && (!AA || CC))//defining if block to check value

      {

         System.out.println("True");//print message

      }

   }

}

Output:

True

True

6)

#include <stdio.h>//defining header file

int main()//defining main method

{

   int x;

   printf("Enter a value: ");

   scanf("%d", &x);

   if (x%2==0)// check number

      {

       printf("Even number");//print message

      }

      else

      {

       printf("Odd Number");//print message

      }

   return 0;

}

Output:

Enter a value: 22

Even number

7)

The answer is "Option C".

In the first question, a double variable "x1"  is defined that inputs the value from the user end and use the boolean operators to check the value and print its value.

In question 5, three boolean variables "AA, BB, and CC" are defined that hold boolean value and use if block to check the given value.

In question 6, an integer variable has defined, that input the value and use if block to check even or odd number and print its value.

In question 7, option c is correct.

You might be interested in
The process of analyzing data to extract information not offered by the raw data alone; it uncovers trends and patterns using te
anygoal [31]

Answer:

The correct answer to the following question is "Data Mining".

Explanation:

It is indeed a method that businesses that are used to transform the raw information towards valuable data. Corporations might learn something about their clients instead of using technology to analyze trends in large quantities of content to create more efficient campaigns, boost revenue as well as reduce costs.

  • It encompasses investigating as well as analyzing huge blocks of documentation to extrapolate useful behavioral patterns.
  • It constructs discernment about what actually happens in certain details, and is already teensy bit mathematical than scripting, but utilizes both.
5 0
3 years ago
_________ is the method used by password crackers who work with pre-calculated hashes of all passwords possible within a certain
sergij07 [2.7K]

Answer:

DOS, Denail of Service Attacks

Explanation:

5 0
2 years ago
Memes are life dont delete if u do then u know im right
soldier1979 [14.2K]

Answer:

oof  ur right

Explanation:

4 0
4 years ago
Read 2 more answers
PLEASE HELP I WILL GIVE BRAINLIEST AND 100 POINTS IF U ANSWER COMPLETELY WITHIN 30 MIN
icang [17]

Answer:

Explanation:

be themselves and that is more than enough to be beautiful. Lastly, I would organize the colorson each photo to be organized to make it look like flowers. That would add a nice touch to seemlike the unorganized pictures are actually organized.

7 0
3 years ago
Steps to customize theme of desktop
Gnom [1K]

Answer:

Choose Start > Control Panel > Appearance and Personalization > Personalization. Right-click an empty area of the desktop and choose Personalize. Select a theme in the list as a starting point for creating a new one. Choose the desired settings for Desktop Background, Window Color, Sounds, and Screen Saver

Explanation:

4 0
3 years ago
Read 2 more answers
Other questions:
  • Only the _________ can add users with passwords and limit user access to selected areas.
    5·1 answer
  • The utilization of a subset of the performance equation as a performance metric is a pitfall. To illustrate this, assume the fol
    13·1 answer
  • A cashier distributes change using the maximum number of five-dollar bills, followed by one-dollar bills. Write a single stateme
    6·1 answer
  • You are asked to add speech to a robotic receptionist that sits at the front desk of a large organization. The robot has an anim
    10·2 answers
  • Retype the statements, correcting the syntax errors.
    8·1 answer
  • Describe how an attacker can use whois databases and the nslookup tool to perform reconnaissance on an institution before launch
    8·1 answer
  • After modifying the font of the Subheading1 style, you notice that the font of Subheading2 has also changed. What is the most li
    12·2 answers
  • Discuss how does a Modulus Operator function
    7·1 answer
  • Consider a k=8 block cipher.
    10·1 answer
  • What is the purpose of system software?
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!