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
miskamm [114]
2 years ago
15

Write a program that estimates how many years, months, weeks, days, and hours have gone by since Jan 1 1970 by calculations with

the number of seconds that have passed.
Computers and Technology
1 answer:
Rzqust [24]2 years ago
6 0

Answer:

Explanation:

The following code is written in Java. It uses the LocalDate import to get the number of seconds since the epoch (Jan 1, 1970) and then uses the ChronoUnit import class to transform those seconds into years, months, weeks days, and hours. Finally, printing out each value separately to the console. The output of the code can be seen in the attached picture below.

import java.time.LocalDate;

import java.time.temporal.ChronoUnit;

class Brainly {

   public static void main(String[] args) {

       LocalDate now = LocalDate.now();

       LocalDate epoch = LocalDate.ofEpochDay(0);

       System.out.println("Time since Jan 1 1970");

       System.out.println("Years: " + ChronoUnit.YEARS.between(epoch, now));

       System.out.println("Months: " + ChronoUnit.MONTHS.between(epoch, now));

       System.out.println("Weeks: " + ChronoUnit.WEEKS.between(epoch, now));

       System.out.println("Days: " + ChronoUnit.DAYS.between(epoch, now));

       System.out.println("Hours: " + (ChronoUnit.DAYS.between(epoch, now) * 24));    

   }

}

You might be interested in
HELP ASAP
Tju [1.3M]

Answer: B. Personal Idea

Explanation:

Issac Newton's Law of Gravity was made by the one and only, Issac Newton.

He used his time to investigate and discover this law, so choice one, cheating is not correct. Choice three is also incorrect, because the world didn't know about this law, or so much about gravity during that time.

Thus, choice two is correct because it was created and written through his ideas.

So therefore, the answer is choice two, personal idea.

Read more on Brainly.com - brainly.com/question/10659333#readmore

4 0
3 years ago
To create a chart, you need to select at least
Nitella [24]

To create a chart, you need to select at least two cells in a range of data.

two cells

<u>Explanation:</u>

In MS excel end user can create graph through insert menu and select chart. In MS excel end user should have enough data in each cells to generate graphs.  

In MS EXCEL end user can create bar graph, pie chart, and line graph. Normally graph means comparing either two sets of values or range of values.

If we select one value it is just graph which gives performance data.

Purpose of graph is to do analysis in graphical presentable manner which an organization can under visual rather than comparing values.

6 0
3 years ago
A​ __________ is a commonly used tool for showing how the parts of a whole are distributed.
dsp73
A. (pie chart) - correct answer
7 0
3 years ago
You friends parents are worried about going over their budget for the month. Which expense would you suggest is NOT a need?
Lapatulllka [165]

Answer:

Anything that doesn't have to do with food (including water), shelter, or clothing.

For Example: Going to the pool is not a need, going on vacation is not a need etc. etc.

Hope this helps

Explanation:

8 0
3 years ago
In 2011 a program named Watson running on an IBM supercomputer
lora16 [44]

Answer:C)Defeated the two most successful human Jeopardy! champions in a three-game match.

Explanation:  Watson emerged from the IBM supercomputer made by Thomas Watson .It is made from the two main component analytical software and the artificial intelligence which made it a optimal for the question-answer feature.

Watson defeated Ken Jennings and Brad Rutter(earlier successful contestants) in the program named Jeopardy by answering questions correctly and quickly in 2011.Other options are incorrect because it did not worked as the software engineer,humane genome or won crossword puzzle.Thus the correct option is option (c).

8 0
3 years ago
Other questions:
  • when you create workplace documents, it is most important to ensure that they are clear, professional, and a. short. b. informal
    7·1 answer
  • When using the boolean data type, we encapsulate the data in what symbol?
    11·2 answers
  • Which view is used to allow a publisher to view facing pages of a publication at the same time? Normal Master Page Two-Page Spre
    5·1 answer
  • Which of the following Google tools support collaboration? Docs Sheets Slides All of the Above
    13·1 answer
  • What is the value of the result after the following statement is executed? int result = 2 + 3 + 4 ;
    7·1 answer
  • Write a pseudo-code that keeps asking the user for a given number 'n' different of zero, then print all numbers between one &amp
    8·1 answer
  • Lucy has to move data from column A to column N in a worksheet. Which keys should she select to move data in the same worksheet?
    9·2 answers
  • State three advantages of using a printer​
    15·1 answer
  • Which version of java should i use?.
    13·1 answer
  • Which privacy protection uses four colors to indicate the expected sharing limitations that are to be applied by recipients of t
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!