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
Norma-Jean [14]
3 years ago
10

A year in the modern Gregorian Calendar consists of 365 days. In reality, the earth takes longer to rotate around the sun. To ac

count for the difference in time, every 4 years, a leap year takes place. A leap year is when a year has 366 days: An extra day, February 29th. The requirements for a given year to be a leap year are:
1) The year must be divisible by 4

2) If the year is a century year (1700, 1800, etc.), the year must be evenly divisible by 400

Some example leap years are 1600, 1712, and 2016.

Write a program that takes in a year and determines whether that year is a leap year.

Ex: If the input is:

1712
the output is:

1712 - leap year
Ex: If the input is:

1913
the output is:

1913 - not a leap year
LABACTIVITY

5.24.1: LAB: Leap year

0 / 10

main.py

Load default template...

17

18

19

20

21

22

23

24

25

26

27

28

29

30

31

32

33

34

35

else

isLeapYear = false;

}

else

isLeapYear = true;

}

else

isLeapYear = false;

if(isLeapYear)

System.out.println(inputYear + " is a leap year.");

else

System.out.println(inputYear + " is not a leap year.");

}
Computers and Technology
1 answer:
alexgriva [62]3 years ago
5 0

Answer:

hmmmmmmmmmmmmmmmmmmmmmmmmmmm

You might be interested in
How to become a web developer ?​
statuscvo [17]

Explanation:

1.By Learning web development Fundamentals.

2.Choose a development specialization.

5 0
3 years ago
What is the definition of "potential energy"?
muminat
Well potential energy is energy that is in a object while its not moving so i would go your third option 
4 0
3 years ago
Read 2 more answers
(1) Prompt the user for a string that contains two strings separated by a comma. (1 pt) Examples of strings that can be accepted
denis-greek [22]

Answer:

Check the explanation

Explanation:

#include <stdio.h>

#include <string.h>

#include <stdlib.h>

#define MAX_LIMIT 50

int checkComma(char *input)

{

int flag = 0;

for(int i = 0; i < strlen(input); i++)

{

if(input[i] == ',')

{

flag = 1;

break;

}

}

return flag;

}

int main(void)

{

char input[MAX_LIMIT];

char *words[2];

char delim[] = ", ";

printf("\n");

do

{

printf("Enter input string: ");

fgets(input, MAX_LIMIT, stdin);

size_t ln = strlen(input) - 1;

if (*input && input[ln] == '\n')

input[ln] = '\0';

if(strcmp(input, "q") == 0)

{

printf("Thank you...Exiting\n\n");

exit(1);

}

else

{

if(checkComma(input) == 0)

{

printf("No comma in string.\n\n");

}

else

{

char *ptr = strtok(input, delim);

int count = 0;

while(ptr != NULL)

{

words[count++] = ptr;

ptr = strtok(NULL, delim);

}

printf("First word: %s\n", words[0]);

printf("Second word: %s\n\n", words[1]);

}

}

}while(strcmp(input, "q") != 0);

return 0;

}

Kindly check the attached image below for the output.

4 0
3 years ago
I got a 52 on my test :(
Eduardwww [97]

Answer:

that sucks i hope u can do better next time have a good day

Explanation:

7 0
3 years ago
Which program will have the output shown below?
Nutka1998 [239]

Answer: Python

Explanation: All I know is that the programming language is Python.

8 0
2 years ago
Read 2 more answers
Other questions:
  • Categories of general purpose application software and examples each​
    13·1 answer
  • Prior to the development of e-commerce, web sites primarily delivered static html pages. true
    11·1 answer
  • Which of these can expose a computer to a virus? Check all that apply.
    9·2 answers
  • What is the name used for the integrated program development environment that comes with a Python installation?
    5·1 answer
  • Which renewable resources are available at any time?​
    15·1 answer
  • When security issues are a special concern, companies want to take extra steps to make sure that transmissions can’t be intercep
    7·1 answer
  • Mention two strategies of collecting data​
    13·1 answer
  • Program a substitution cipher in Python. Create 2 functions one for encryption and the other for decryption ( get the text as th
    8·1 answer
  • Keira is creating an app for her cross-country team. Users will input their race times and the output will be a graph showing th
    6·1 answer
  • How do you convert an algorithm to make it possible for a computer to read
    6·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!