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.
Explanation:
1a. i know only 4 components of computer these are users, data,hardware & software
1b.users,the person who use the computer
data,it is the collection of raw facts and figures
hardware,is the physical part of the computer that can be seen and touch
software,is a set of program that instruct the computer to perform the certain action
2a,an internet is worldwide systen of interconnected computer network
2b.if some student want to now about something he can use internet and get the answer,to commenicate with others,and to learn online
Answer:
Yes, we can.
Explanation:
We can combine with the arithmetic and the concatenation operators to provide augmented assignment operations in the programming language Python.
This mean we can abbreviate expressions like n = n + 1
For example:
n += 10 this is equal to n = n + 10
n += "example" this is equal to n = n + "example"
In this example we have
variable = variable operator expression equal to variable operator = expression.
These arguments are often used in Python's loops.
Answer:
1 no.
ram
2
harmful software to the computer
3
local area network
4
bit
5
ram
6
morris malware
7
hard disk drive
8
read only memory9
gigabyte
hope this will help u
<span>Server virtualization in windows server 2012 r2 is based on a module called the</span> hypervisor.