Answer:
The correct answer to the following question will be "Semantic and Syntax error".
Explanation:
<u>Syntax error: </u>
Corresponds to such a mistake in a pattern sentence structure that is composed in either a specific language of that same coding. Because computer programs have to maintain strict syntax to execute appropriately, any elements of code that would not adhere to the programming or scripting language syntax can result inside a syntax error.
<u>Semantic error: </u>
That would be a logical error. This is because of erroneous logical statements. Write inaccurate logic or code of a program, which results incorrectly whenever the directives are implemented.
So, it's the right answer.
Answer:
import java.util.Scanner;
public class LabProgram {
public static void main(String[] args) {
Scanner scnr = new Scanner(System.in);
int inputYear;
boolean isLeapYear;
isLeapYear = false;
inputYear = scnr.nextInt();
// If a year is divisible by 400, then it is a leap year
if (inputYear % 400 == 0)
isLeapYear = true;
// If a year is divisible by 100, then it is not a leap year
if (inputYear % 100 == 0)
isLeapYear = false;
// If a year is divisible by 4, then it is a leap year
if (inputYear % 4 == 0)
isLeapYear = true;
if(isLeapYear)
System.out.println(inputYear + " is a leap year.");
else
System.out.println(inputYear + " is not a leap year.");
}
}
Explanation:
- Take the year as an input from user and store it to inputYear variable.
- If the year is a century year, check if the year is divisible by 400 ( the year must be evenly divisible by 400 ), then set the boolean isLeapYear to true. If a year is divisible by 100, then set the boolean isLeapYear to false. If a year is divisible by 4, then set the boolean isLeapYear to true.
- Check if isLeapYear is true, then print that it is a leap year. Otherwise, print that it is not a leap year.
Output:
1712
1712 is a leap year.
Answer:
True
Explanation: A qualifier is a term used in IT(information technology) and computer software. It is used to differentiate/ identify and select different sets of objects that are located at the far ends of a qualifier association.
A qualifier is usually used to identify an object from a set of closely related and similar objects, they are usually small boxes possibly with a rectangular shape.
The result of the subtraction of 4365 and 3412 using octal numbers is of:
753.
<h3>What are octal numbers?</h3>
For octal numbers, each number is represented by three bits, as follows:
Then the binary representation of number 4365 is given as follows:
100011110101
The binary representation of number 3412 is given as follows:
011100001010
Then the following binary subtraction is made:
100011110101 - 011100001010
The result of this subtraction is of:
100011110101 - 011100001010 = 111101011
Then the octal result is given as follows:
111 101 011 = 753.
More can be learned about binary numbers at brainly.com/question/8649831
#SPJ1