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]
3 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]3 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
An embedded system describes computing technology that has been enclosed in protective shielding for security reasons. True or f
ddd [48]

The statement 'an embedded system describes computing technology that has been enclosed in protective shielding for security reasons is false.

In the field of computers and technology, an embedded system can be described as a small computer, more overly an integrated chip, that is enclosed in an electronic device in order for making the device to run. The small computer integrated into the device helps in regulating the device. The purpose of an embedded system is not for protective shielding or security reasons hence the statement above is false.

In an embedded system, a combination of computer processor, computer memory, and input/output peripheral devices is present that performs a dedicated function. Microcontrollers are used for the management of an embedded system.

To learn more about embedded system, click here:

brainly.com/question/13014225

#SPJ4

7 0
2 years ago
A common hardware component found in electronic devices including desktop computers, laptops, tablets and smartphones. The amoun
Maurinko [17]

Answer:

A. RAM

Explanation:

RAM (Random Access Memory) is the hardware in a computing device where the operating system (OS), application programs and data in current use are kept so they can be quickly reached by the device's processor.

8 0
3 years ago
Which is a basic job requirement for a career in corrections services?
Diano4ka-milaya [45]

You must have a high school diploma

7 0
3 years ago
Interest accumulated on the principle of a loan must also be paid. The accumulated interest is known as which of the following?
tangare [24]
I think B but idk lol
7 0
3 years ago
Expain the application areas of ICT in education sector and E-commerce​
miss Akunina [59]

Explanation:

<em>N</em><em>o</em><em>w</em><em>a</em><em>d</em><em>a</em><em>y</em><em>s</em><em> </em><em>a</em><em>l</em><em>m</em><em>o</em><em>s</em><em>t</em><em> </em><em>a</em><em>l</em><em>l</em><em> </em><em>t</em><em>h</em><em>e</em><em> </em><em>s</em><em>c</em><em>h</em><em>o</em><em>o</em><em>l</em><em> </em><em>a</em><em>n</em><em>d</em><em> </em><em>c</em><em>o</em><em>l</em><em>l</em><em>e</em><em>g</em><em>e</em><em> </em><em>u</em><em>s</em><em>e</em><em> </em><em>c</em><em>o</em><em>m</em><em>p</em><em>u</em><em>t</em><em>e</em><em>r</em><em>s</em><em> </em><em>i</em><em>n</em><em> </em><em>c</em><em>l</em><em>a</em><em>s</em><em>s</em><em>r</em><em>o</em><em>o</em><em>m</em><em>s</em><em> </em><em>a</em><em>n</em><em>d</em><em> </em><em>l</em><em>a</em><em>b</em><em>s</em><em> </em><em>t</em><em>o</em><em> </em><em>t</em><em>e</em><em>a</em><em>c</em><em>h</em><em> </em><em>s</em><em>t</em><em>u</em><em>d</em><em>e</em><em>n</em><em>t</em><em>s</em><em>.</em><em>A</em><em> </em><em>t</em><em>e</em><em>a</em><em>c</em><em>h</em><em>e</em><em>r</em><em> </em><em>c</em><em>a</em><em>n</em><em> </em><em>t</em><em>e</em><em>a</em><em>c</em><em>h</em><em> </em><em>e</em><em>f</em><em>f</em><em>e</em><em>c</em><em>t</em><em>i</em><em>v</em><em>e</em><em>l</em><em>y</em><em> </em><em>u</em><em>s</em><em>i</em><em>n</em><em>g</em><em> </em><em>c</em><em>o</em><em>m</em><em>p</em><em>u</em><em>t</em><em>e</em><em>r</em><em>-</em><em>b</em><em>a</em><em>s</em><em>e</em><em>d</em><em> </em><em>p</em><em>r</em><em>e</em><em>s</em><em>e</em><em>n</em><em>t</em><em>a</em><em>t</em><em>i</em><em>o</em><em>n</em><em>s</em><em>.</em><em>S</em><em>t</em><em>u</em><em>d</em><em>e</em><em>n</em><em>t</em><em>s</em><em> </em><em>c</em><em>a</em><em>n</em><em> </em><em>s</em><em>t</em><em>u</em><em>d</em><em>y</em><em> </em><em>d</em><em>i</em><em>f</em><em>f</em><em>e</em><em>r</em><em>e</em><em>n</em><em>t</em><em> </em><em>s</em><em>u</em><em>b</em><em>j</em><em>e</em><em>c</em><em>t</em><em>s</em><em> </em><em>a</em><em>n</em><em>d</em><em> </em><em>c</em><em>o</em><em>m</em><em>p</em><em>l</em><em>e</em><em>t</em><em>e</em><em> </em><em>t</em><em>h</em><em>e</em><em>i</em><em>r</em><em> </em><em>a</em><em>s</em><em>s</em><em>i</em><em>g</em><em>n</em><em>m</em><em>e</em><em>n</em><em>t</em><em> </em><em>b</em><em>y</em><em> </em><em>u</em><em>s</em><em>i</em><em>n</em><em>g</em><em> </em><em>d</em><em>i</em><em>f</em><em>f</em><em>e</em><em>r</em><em>e</em><em>n</em><em>t</em><em> </em><em>s</em><em>o</em><em>f</em><em>t</em><em>w</em><em>a</em><em>r</em><em>e</em><em> </em><em>i</em><em>n</em><em> </em><em>c</em><em>o</em><em>m</em><em>p</em><em>u</em><em>t</em><em>e</em><em>r</em><em>.</em><em>T</em><em>h</em><em>e</em><em> </em><em>C</em><em>o</em><em>m</em><em>p</em><em>u</em><em>t</em><em>e</em><em>r</em><em> </em><em>B</em><em>a</em><em>s</em><em>e</em><em>d</em><em> </em><em>T</em><em>r</em><em>a</em><em>i</em><em>n</em><em>i</em><em>n</em><em>g</em><em>(</em><em>C</em><em>B</em><em>T</em><em>)</em><em> </em><em>a</em><em>n</em><em>d</em><em> </em><em>W</em><em>e</em><em>b</em><em> </em><em>B</em><em>a</em><em>s</em><em>e</em><em>d</em><em> </em><em>T</em><em>r</em><em>a</em><em>i</em><em>n</em><em>i</em><em>n</em><em>g</em><em>(</em><em>W</em><em>B</em><em>T</em><em>)</em><em> </em><em>a</em><em>r</em><em>e</em><em> </em><em>a</em><em>i</em><em>d</em><em> </em><em>t</em><em>o</em><em> </em><em>t</em><em>e</em><em>a</em><em>c</em><em>h</em><em> </em><em>t</em><em>h</em><em>e</em><em> </em><em>s</em><em>t</em><em>u</em><em>d</em><em>e</em><em>n</em><em>t</em><em> </em><em>i</em><em>n</em><em> </em><em>t</em><em>h</em><em>e</em><em> </em><em>c</em><em>l</em><em>a</em><em>s</em><em>s</em><em>r</em><em>o</em><em>o</em><em>m</em><em>.</em>

<em>E</em><em>-</em><em>c</em><em>o</em><em>m</em><em>m</em><em>e</em><em>r</em><em>c</em><em>e</em><em> </em><em>i</em><em>s</em><em> </em><em>a</em><em> </em><em>f</em><em>i</em><em>n</em><em>a</em><em>n</em><em>c</em><em>i</em><em>a</em><em>l</em><em> </em><em>b</em><em>u</em><em>s</em><em>i</em><em>n</em><em>e</em><em>s</em><em>s</em><em> </em><em>t</em><em>r</em><em>a</em><em>n</em><em>s</em><em>a</em><em>c</em><em>t</em><em>i</em><em>o</em><em>n</em><em> </em><em>c</em><em>o</em><em>n</em><em>d</em><em>u</em><em>c</em><em>t</em><em>e</em><em>d</em><em> </em><em>e</em><em>l</em><em>e</em><em>c</em><em>t</em><em>r</em><em>o</em><em>n</em><em>i</em><em>c</em><em>a</em><em>l</em><em>l</em><em>y</em><em> </em><em>b</em><em>e</em><em>t</em><em>w</em><em>e</em><em>e</em><em>n</em><em> </em><em>b</em><em>u</em><em>s</em><em>i</em><em>n</em><em>e</em><em>s</em><em>s</em><em> </em><em>p</em><em>a</em><em>r</em><em>t</em><em>n</em><em>e</em><em>r</em><em>s</em><em> </em><em>o</em><em>v</em><em>e</em><em>r</em><em> </em><em>t</em><em>h</em><em>e</em><em> </em><em>i</em><em>n</em><em>t</em><em>e</em><em>r</em><em>n</em><em>e</em><em>t</em><em>.</em><em>B</em><em>u</em><em>s</em><em>i</em><em>n</em><em>e</em><em>s</em><em>s</em><em> </em><em>t</em><em>r</em><em>a</em><em>n</em><em>s</em><em>a</em><em>c</em><em>t</em><em>i</em><em>o</em><em>n</em><em>s</em><em> </em><em>c</em><em>a</em><em>n</em><em> </em><em>o</em><em>c</em><em>c</em><em>u</em><em>r</em><em> </em><em>v</em><em>e</em><em>r</em><em>y</em><em> </em><em>q</em><em>u</em><em>i</em><em>c</em><em>k</em><em>l</em><em>y</em><em> </em><em>a</em><em>n</em><em>d</em><em> </em><em>g</em><em>l</em><em>o</em><em>b</em><em>a</em><em>l</em><em>l</em><em>y</em><em>.</em><em>T</em><em>h</em><em>e</em><em> </em><em>p</em><em>e</em><em>o</em><em>p</em><em>l</em><em>e</em><em> </em><em>c</em><em>a</em><em>n</em><em> </em><em>b</em><em>u</em><em>y</em><em>,</em><em>s</em><em>e</em><em>l</em><em>l</em><em> </em><em>a</em><em>n</em><em>d</em><em> </em><em>e</em><em>x</em><em>c</em><em>h</em><em>a</em><em>n</em><em>g</em><em>e</em><em> </em><em>t</em><em>h</em><em>e</em><em> </em><em>p</em><em>r</em><em>o</em><em>d</em><em>u</em><em>c</em><em>t</em><em>s</em><em> </em><em>o</em><em>r</em><em> </em><em>s</em><em>e</em><em>r</em><em>v</em><em>i</em><em>c</em><em>e</em><em>s</em><em> </em><em>u</em><em>s</em><em>i</em><em>n</em><em>g</em><em> </em><em>i</em><em>n</em><em>t</em><em>e</em><em>r</em><em>n</em><em>e</em><em>t</em><em>.</em><em>T</em><em>o</em><em>d</em><em>a</em><em>y</em><em>s</em><em> </em><em>m</em><em>a</em><em>n</em><em>y</em><em> </em><em>c</em><em>o</em><em>m</em><em>p</em><em>u</em><em>t</em><em>e</em><em>r</em><em> </em><em>c</em><em>a</em><em>n</em><em> </em><em>a</em><em>l</em><em>s</em><em>o</em><em> </em><em>a</em><em>c</em><em>c</em><em>e</em><em>s</em><em>s</em><em> </em><em>t</em><em>h</em><em>e</em><em> </em><em>I</em><em>n</em><em>t</em><em>e</em><em>r</em><em>n</em><em>e</em><em>t</em><em> </em><em>t</em><em>h</em><em>r</em><em>o</em><em>u</em><em>g</em><em>h</em><em> </em><em>w</em><em>i</em><em>r</em><em>e</em><em>l</em><em>e</em><em>s</em><em>s</em><em> </em><em>t</em><em>e</em><em>c</em><em>h</em><em>n</em><em>o</em><em>l</em><em>o</em><em>g</em><em>i</em><em>e</em><em>s</em><em>.</em>

8 0
3 years ago
Other questions:
  • You work administrative assistant in an engineering firm. A co-worker constantly makes fun of the engineers by whispering commen
    13·1 answer
  • You have a large dataset that will print on several pages. You want to ensure that related records print on the same page with c
    11·1 answer
  • Jennifer recently bought a new computer to type a new manuscript she’s been working on. She also stored a lot of movies on it to
    10·1 answer
  • Tanya has received an email, apparently from her bank, stating that some of her records were lost during server maintenance work
    14·1 answer
  • Special effects are added using the _____.
    16·1 answer
  • The labels button is found under the
    7·2 answers
  • PLEASE HELP!!! THIS IS WORTH A TEST GRADE!!!
    13·1 answer
  • Which type of NAC agent will be used during the posture assessment before allowing access to the VPN users?
    9·1 answer
  • Why is it important to prepare the farm resources before you start working? explain​
    14·1 answer
  • How to display the name and address of customer from cuseast table through descending order using their id in
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!