9.
Write an application that computes and displays the day on which you become (or
became) 10,000 days old. Save the application as Ten ThousandDaysOld.java.
TI

Answers

Answer 1

Answer:

Explanation:

The following code is written in Java and it asks you for your age and then prints out the exact date from your birthday that you will turn 10,000 days old.

import java.util.Calendar;

import java.util.Date;

import java.util.Scanner;

public class Main {

   public static void main(String[] args) {

       Scanner in = new Scanner(System.in);

       System.out.println("What is your age?");

       int age = in.nextInt();

       int daysLeft = (10000 - (age*365));

       Date birthday = new Date();

       Calendar cal = Calendar.getInstance();

       cal.setTime(birthday);

       cal.add(Calendar.DATE, daysLeft);

       Date modifiedDate = cal.getTime();

       System.out.println(modifiedDate);

   }

}


Related Questions

Which is an example of a variable name written in camelcase?

Song Name
songName
song Name
SongNAME

Answers

Answer: songName

-DoggyMan5

Vector images are drawn ________ available in most graphic software programs.

Answers

Answer:

Vector images are drawn with basic line tools available in most graphic software programs

Explanation:

A vector graphic image makes use of points coordinate points on a Cartesian plane, to define computer graphic images, such that the image is based on mathematical relationships between the different parts of the image rather the use of pixels

Vector images are therefore smooth without aliasing errors for all sizes to which the image is zoomed given that the image generated by a combination of lines, curves and points

Other Questions
Whats 20, 48, and 8 as a decimal?? (Ill give you brainlest because Im awesome!) answer choices:A(0 , 4) B(-5 , -10)C(-4 , -12)D(12 , 0) Niccolo runs the first half of a race in 23.08 seconds and the second half of the race in 27.92 seconds. What is Niccolo's total time for the race? What are causes for student to drop pout from university Find the value of x: Need answer PLS will give brainiest all of the benches in the park are red or blue Read this excerpt from the Declaration of Independence.We have warned them from time to time of attempts by their legislature to extend an unwarrantable jurisdiction over us. We have reminded them of the circumstances of our emigration and settlement here. We have appealed to their native justice and magnanimity, and we have conjured them by the ties of our common kindred to disavow these usurpations, which, would inevitably interrupt our connections and correspondence. They too have been deaf to the voice of justice and of consanguinity. We must, therefore, acquiesce in the necessity, which denounces our Separation, and hold them, as we hold the rest of mankind, Enemies in War, in Peace Friends.Which best describes the colonists view of their relationship with the British government?A) The colonists have demanded fair treatment from the British government many times, and they believe separating from Britain is their last resort.B) The colonists will continue to demand fair treatment from the British government until they receive what they are asking for.C) The colonists view the British as friends, and they do not want to rebel against the British government.D) The colonists are eager to go to war with the British as punishment for their unjust treatment of the colonies. What does "donated" refer to? A the act of buying something expensive B the act of giving something away for free C the decision to sell something special D the decision to hide something away ME RESULVEN ESTO POR FA6 -1-3 -19+3-3. -72.8-5.+3-10:-518: -3-9 : 9 Which equation is a related fact to 60 10 = ? A) = 10 60 B) 10 = 60 C) 10 = 60 Please help me. 2. What factors do you think contributed to Sudha3. Why did Sudha Murty leave her job at TELCO?Sudha Murty says that I did not have anair while delivering a speech to your classmate encouraging them to volunteer at the local homeless shelter, you hope to convey your passion byA)speaking in a monotone voice B)shouting at them to get involvedC)talking quietly throughout the speech so they wont be offendedD)using clear voice and a consistent volume Find the surface area of each prism. Show your work for full credit! I've wasted 42 points already. Can someone PLZ just answer my Question and stop wasting my points. PLz, this is due. I need help What is the molecular formula for C5H7 if its molar mass is 536 g/mol? Adapting to Life at Sea: Take a look at this article from Natural History Magazine. Explain the connection between sea snake's diet, the way in which they eliminate nitrogenous waste, and their need for freshwater. Then explain why this makes life (in at least one way) difficult for them in the ocean. Whats metabolism?? Help meh All planets rotate counterclockwise except one. Which planet rotates clockwise?MarsVenusEarthMercury Amigos ayudenme que es el tema