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
Grace [21]
4 years ago
9

Which of the following correctly describes the syntax of an If statement?

Computers and Technology
1 answer:
Ber [7]4 years ago
8 0

if(Expression to be tested) {

code to execute

} else if(Expression to be tested) {

code to execute

}


you can have as many else ifs as you want. But that's what it looks like.

You might be interested in
Write a static method named anglePairs that accepts three angles (integers), measured in degrees, as parameters and returns whet
padilas [110]

Answer:

The java program for the scenario is given below.  

import java.util.*;

public class Test

{

// method returning sum of all digits in the integer parameter

static boolean anglePairs(int a1, int a2, int a3)

{

   // variable to hold sum of two complementary angles

   int comp=90;  

   // variable to hold sum of two supplementary angles

   int supp=180;

   // boolean variable to hold result

   boolean result = false;

   if( (a1+a2 == comp) || (a2+a3 == comp) || (a1+a3 == comp) )

   {

       if( (a1+a2 == supp) || (a2+a3 == supp) || (a1+a3 == supp) )

           result = true;

       else

           result = false;

   }    

           // return variable result

       return result;

}

public static void main(String[] args)

{

   // method is called by passing three positive angles

   System.out.println("The pair of angles have both complementary and supplementary angles " + anglePairs(100, 80, 90) );    

}

}

OUTPUT

The pair of angles have both complementary and supplementary angles false

Explanation:

The program works as described below.

1. The method, anglePairs(), is declared as static having return type as Boolean which takes three positive integer parameters.

static boolean anglePairs(int a1, int a2, int a3)

{

}

2. The integer variable, comp, is declared and initialized to 90.

3. The integer variable, supp, is declared and initialized to 180.

4. The Boolean variable, result, is declared and initialized to false.

5. Using if-else statements, sum of two angles are compared with the variables, comp and supp.

6. If the sum of any two angles match with both, comp and supp, variables, the Boolean variable, result is assigned value true. Otherwise, result is assigned value false.

7. The value of result is returned.

8. Inside main() method, the function anglePairs() is called and three positive numerical values are passed as parameters.  The output is displayed.

9. All the above code is written inside the class Test.

10. User input is not taken since it is not mentioned in the question.

8 0
3 years ago
Following rules of compaction, the IPv6 address 2001:0db8:0000:0000:0000:ff00:0012:3456 could also be written as _______.
vampirchik [111]

In regards to the rules of compaction, the IPv6 address 2001:0db8:0000:0000:0000:ff00:0012:3456 could also be written as 2001:db8::ff00:12:3456.

<h3>What is IPv6?</h3>

The IPv6 address is known to be a form of Internet Layer protocol made for packet-switched internetworking and it helps to give  an end-to-end datagram movement in course of multiple IP networks.

Note that, In regards to the rules of compaction, the IPv6 address 2001:0db8:0000:0000:0000:ff00:0012:3456 could also be written as 2001:db8::ff00:12:3456.

Learn more aboutIPv6 address   from

brainly.com/question/5296366

#SPJ1

4 0
2 years ago
The working window of a presentation is the _____.
stepan [7]
The answer would be slide
8 0
4 years ago
Read 2 more answers
Why is it that even though there aren't the max number of answers on a question, (or sometimes even NO answers) When I click the
maks197457 [2]
It has happened to me before. i think it’s just because someone is already typing an answer maybe ‍♀️ or try restarting the app and get back on it. might be jus a glitch from the app but either way hope you get it fixed :)
4 0
3 years ago
Write a java program as follows Write a method called powOfTwo that takes an integer as parameter, computes, and outputs it’s sq
Kisachek [45]

Answer:

public static int powOfTwo(int input) {

 return input*input;

}

You will have to call this method in main
for printing it, write

System.out.println(powOfTwo(your number));

in public static void main(str[]args) {

}

8 0
2 years ago
Other questions:
  • Assume that scotus is a two-dimensional character array that stores the family names (last names ) of the nine justices on the S
    6·1 answer
  • Which one of the following is not the name of a 20th century school composition
    14·2 answers
  • ____ is the use of networking technology to provide medical information and services.
    14·1 answer
  • Compare the specialized and statistical functions in excel
    10·1 answer
  • Which of the following statements isNOT true about abstract data types (ADTs)?A list is anexample of an ADT.ADTs hide theimpleme
    7·1 answer
  • A relational database is different from a simple database because it has more than one _____.
    13·1 answer
  • Which of the following files has the Ionic styles? ionic.bundle.css ionic.js ionic.css ionic.bundle.js
    13·1 answer
  • How do i make a profile picture <br> REALLY URGENT I NEED IT NOW!!!
    8·2 answers
  • An IT suspects that an unauthorized device is connected to a wireless network. This is a result of pastry sharing on a device br
    13·1 answer
  • To read cheques, banks use​
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!