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
labwork [276]
3 years ago
7

The current calendar, called the Gregorian calendar, was introduced in 1582. Every year divisible by four was declared to be a l

eap year, with the exception of the years ending in 00 (that is those divisible by 100) and not divisible by 400. For instance, the years 1600 and 2000 are leap years, but 1700, 1800, and 1900 are not. Write a program that requests a year as input and states whether it is a leap year. (Test the program on the years 2008, 2009, 1900, and 2000.)
Computers and Technology
1 answer:
Naily [24]3 years ago
8 0

Solution :

Public Function Is a Leap_Year(Year As_Integer) As Integer

'Dim Tor_F for local variable declaring if value is t/f.

Dim TorF As For Boolean

'Pre conditions: Year > 1581 and Year < 3000

If Year > 1581 And Year <> 1700 Or 1800 Or 1900 Then

IsLeapYear = Year / 4

Else

IsLeapYear = False

TorF = False

End If

End Function

You might be interested in
Write two scnr.nextInt statements to get input values into birthMonth and birthYear. Then write a statement to output the month,
Firlakuza [10]

Answer:

Here is code in Java.

// import package

import java.util.*;

class Main

{   // main method of class

public static void main (String[] args) throws java.lang.Exception

{

   try{

       // variables to store the input

       int birthMonth,birthYear;

       // Scanner class object to read the input

       Scanner scnr=new Scanner(System.in);

       System.out.print("Please enter the birth month:");

       // read the birth month

       birthMonth=scnr.nextInt();

       System.out.print("Please enter the birth year:");

       // read the birth year

       birthYear=scnr.nextInt();

       // print the output

       System.out.println(birthMonth+"/"+birthYear+"\n");

   }catch(Exception ex){

       return;}

}

}

Explanation:

Create two variables "birthMonth" & "birthYear" to store the birth month and birth year.Read the  values of both from user. Print the birth month and birth year separated by a slash("/").

Output:

Please enter the birth month:1                                                                                                

Please enter the birth year:2000                                                                                              

1/2000  

Please enter the birth month:5                                                                                                

Please enter the birth year:1950                                                                                              

5/1950  

7 0
3 years ago
Role of User Defined Iprms for creation of paten
Mazyrski [523]

Answer:

3

Explanation:

3 0
3 years ago
It is necessary for us to verify and checked information before we shared online? Explain​
lesya [120]

Answer:

The answer is yes.

Explanation:

If you don’t check where the source is from and if it is verified, you may share an incorrect and false answer. Also, you may type in your personal information. This is <u>VERY</u> risky. Do <u>NOT</u> share your private information to strangers!

You can check your information by searching it up online or asking a teacher! There! I hope this helps! ;)

4 0
2 years ago
Which peripheral device is used to record sound?
faust18 [17]

he will need a microphone, it is a recording device.

8 0
3 years ago
Read 2 more answers
Which VPN protocol provides encryption but does not support IP multicast traffic?
ZanzabumX [31]

Answer:

this?

Explanation:

multiple choice?

3 0
2 years ago
Other questions:
  • Peripherals are part of the main computer.<br><br> True<br> False
    9·2 answers
  • Define decomposition
    9·1 answer
  • Why is investing in a mutual fund less risky than investing in a particular company's stock? A. Mutual funds only invest in blue
    14·2 answers
  • #Write a function called "replace_all" that accepts three #arguments: # # - target_string, a string in which to search. # - find
    11·1 answer
  • Individuals who require better speed and performance for graphics-intensive applications (e.g., video editing, gaming, etc.) pre
    8·1 answer
  • Consider the following high-level recursive procedure: long long int flong long int n, long long int k long long int b b k+2; if
    9·1 answer
  • What is a foreign key and how does it provide referential integrity?
    10·1 answer
  • Which action is a result of human error?
    10·1 answer
  • PLS HELP
    5·1 answer
  • Question 1 of 10
    14·2 answers
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!