Answer:
In Java
import java.util.Scanner;
public class Main {
public static void main(String[] args) {
int mnth, yr;
Scanner input = new Scanner(System.in);
System.out.print("Month: "); mnth = input.nextInt();
System.out.print("Year: "); yr = input.nextInt();
boolean lpYear = (yr % 4 == 0 && yr % 100 != 0) || (yr % 400 == 0);
if(mnth == 1 || mnth == 3 || mnth == 5 || mnth== 7 || mnth == 8 || mnth == 10 || mnth == 12){
System.out.print("31 days"); }
else if(mnth == 2){
System.out.print(((lpYear) ? "29 days" : "28 days")); }
else if(mnth == 9 || mnth == 6 || mnth == 4 || mnth== 11){
System.out.print("30 days"); }
else{ System.out.print("Invalid"); }
}
}
Explanation:
See attachment for complete program where comments were used as explanation.
Answer:
The answer to this question is given below in the explanation section.
Explanation:
"D" option is correct
"Each statement needs to end in a semicolon."
semicolon must use in program.without semicolon program doesn't accept.so each statement needs to end in a semicolon.
Answer:
hi sorry for not knowing the answer
but please follow have a great day,night, or afternoon
Answer: There are many parts of a computer, but there are basic ones and major ones.
Explanation: Computers may look very different, but the components installed are standard. The major difference among most machines is the brand of hardware installed. The hardware components—video card, processor, memory, motherboard and hard drive—are the same for all computer systems. While, these are the major ones: Motherboard.
Processor/CPU.
Power Supply.
Hard Drive.
PCI-Express Cards.
Graphics Cards.
RAM/Memory.
Answer:
The student because you are replying to the student.
Explanation: