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
Bingel [31]
3 years ago
6

Assume that an int variable is Quadrilateral has been declared, and that another int variable, number Of Sides has been declared

and initialized. Write a statement that assigns the value 1 if number Of Sides is exactly 4 and 0 otherwise.
Computers and Technology
1 answer:
kondor19780726 [428]3 years ago
4 0

Answer:

The answer to this question can be given as:

Statement:

isQuadrilateral = (numberOfSides == 4) ? 1 : 0;

//check condition using ternary operator.

Explanation:

we know that both(Quadrilateral, numberOfSides) is already declared in the program. So the statement for check condition is (isQuadrilateral = (numberOfSides == 4) ? 1 : 0;). To check this condition we use the ternary operator. In this operator, we also check another condition. The syntax of ternary operator (condition ? value_if_true : value_if_false).In this statement on the lift side we use the variable for check condition and right side we check condition if the value is true it prints 1 else it will print 0.

You might be interested in
Another important mode, XTS-AES, has been standardized by the __________ Security in Storage Working Group. a. IEEE b. ITIL c. N
Archy [21]

Answer:

a. IEEE

Explanation:

The organization with the acronym 'IEEE' is commonly known as the Institute of Electrical and Electronics Engineer. The organization is responsible for the standardization and implementation of various important modes such as the XTS-AES. This is widely used for data encryption and it is a major part of the AES algorithm.

8 0
3 years ago
Read 2 more answers
Complete the following:_____
alexira [117]

Answer:

The answer to the give question as follows:

1) \n

2) \t

3) \'

4) \"

5) \\

Explanation:

The description of the above symbols as follows:

  • The \n is used to provide the new line spacing.
  • The \t is used to provide a tab space.
  • To assign a single character value we use \' single.
  • The double \" quote is used to assign a string value.
  • The backslash is used to provide the character of the escape and it also used in a file path.
7 0
3 years ago
"what should you do if the system continually reboots and you can't read the error message produced on a blue screen
mr_godi [17]
I am fairly sure the command for boot options is F11, and if not, then power down the system manually and turn it back on
4 0
3 years ago
Read 2 more answers
(Java) Write a program that accepts a number of minutes and converts it both to hours and days. For example, 6000 minutes is 100
iogann1982 [59]
Import java.util.Scanner;
public class MinutesConversion {
private static Scanner inputDevice;
public static void main(String[] args) {
int minutes, hours;
float days; // float for decimal point

inputDevice = new Scanner(System.in);
System.out.println("Please enter minutes for conversion >> ");
minutes = inputDevice.nextInt();
hours = minutes / 60;
days = hours / 24.0f;


System.out.println(+ minutes + " minutes is " + hours + " hour(s) or" + days " days");
}
}
6 0
3 years ago
What is an easy and accurate way that a graphic designer can increase the size of a digital shape while keeping the ratio of hei
VikaD [51]

Answer:

Open the shape’s properties window, and type the height value multiplied by 2 and the width value multiplied by 3.

Explanation:

7 0
3 years ago
Read 2 more answers
Other questions:
  • For some people , alcohol can cause an uncontrollable blank of the eyes , making good vision almost impossible
    5·1 answer
  • Which partitioning method must you use for a 4-tb hard drive?
    13·1 answer
  • _________ are represented using diamonds linked withparticipant ETs
    6·1 answer
  • A user has just reported that he downloaded a file from a prospective client using IM. The user indicates that the file was call
    11·1 answer
  • 10.7 LAB: Fat-burning heart rate Write a program that calculates an adult's fat-burning heart rate, which is 70% of 220 minus th
    8·1 answer
  • A USB device used to transfer photos from the memory card to a hard drive is called a _____.
    5·2 answers
  • Since the web.xml file describes how the web application should be configured when it is deployed on a server, the file is known
    7·1 answer
  • Pls help me<br> first one to answer correctly gets brainly points
    6·2 answers
  • Please Helpppp Me User Interface Design ensures that the interface has elements that are easy to ________________. (Choose all t
    8·1 answer
  • 2. What are some other reasons why you might need to know the operating system version on your computer or mobile device
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!