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
Karolina [17]
3 years ago
15

9.

Computers and Technology
1 answer:
Svetllana [295]3 years ago
7 0

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);

   }

}

You might be interested in
Create an application in Java that asks a user for a number of hours, days, weeks, and years. It then computes the equivalent nu
Nostrana [21]

Answer:

<em>The program written in Java is as follows;</em>

<em>The program takes input for hours, days, weeks and months; </em>

<em>Then the inputs are converted to minutes individually and then summed up</em>

<em>For you to better understand the program,  made use of comments to explain difficult lines,</em>

<em>The program is as follows</em>

import java.util.*;

public class Assignment{

public static void main(String []args){

//This line declares all variables

int hours, days, weeks, years;

Scanner input = new Scanner(System.in);

//This line prompts user for hours input

System.out.print("Hours: ");

//This line accepts input for hours

hours = input.nextInt();

//This line prompts user for days  input        

System.out.print("Days: ");

//This line accepts input for days

days = input.nextInt();

//This line prompts user for weeks input

System.out.print("Weeks: ");

//This line accepts input for weeks

weeks = input.nextInt();

//This line prompts user for years input

System.out.print("Years: ");

//This line accepts input for years

years = input.nextInt();

//This line converts hours to minute

int minute = 60 * hours + 1440 * days + 10080 * weeks + 525600 * years;

//This line prints the equivalent minute of user input

System.out.println(minute +" minutes");

}

}

8 0
3 years ago
Process and procedures are important but not critical to the effective use of computer based information systems.
larisa [96]

Answer:

False

Explanation:

Process and procedures are important and critical to the effective use of computer based information systems.

This is because without process and procedures computer based information systems cannot solve the problems that a business or an organization faces.

Process and procedures define the way computer based information systems is used.

6 0
3 years ago
5. Users report that your company's Windows Server 2003 terminal server is experiencing performance issues. You have a performan
timurjin [86]

Question options:

A. a port scanner

B. System Monitor

C. a network analyzer

D. a vulnerability test

Answer:

C. a network analyzer

Explanation:

A network analyzer will provide the network data needed to determine the performance of the server and if there is an attack on the server. Network analyzers track network traffic and collects information on data being transferred on the network. Using network analyzer tools we can be able to troubleshoot network problem if server may be running slow and so determine where an attack may be coming from. Network analyzers can be hardwares or softwares(like solarwinds)

7 0
3 years ago
Given a long integer representing a 10-digit phone number, output the area code, prefix, and line number using the format (800)
kaheart [24]

Answer:

# User is prompted to enter phone number

phone_number = int(input("Enter your 10-digit phone number: "))

# this modulus operation will give the last 4 digit

# as the line number

line_number = phone_number % 10000

# this integer division will give a combination

# of area code and prefix

area_code_prefix = phone_number // 10000

# this integer division of the area_code_prefix

# will give the area_code

area_code = area_code_prefix // 1000

# this modulo operation of the area_code_prefix

# will give the prefix

prefix = area_code_prefix % 1000

# the phone number is printed in the specified format

print('(',area_code,')',' ',prefix,'-',line_number, sep='')

Explanation:

A sample image of program output is attached.

4 0
4 years ago
Some keys on a keyboard, like the caps lock and number lock keys, are ____ keys, which are pressed once to turn the feature on a
kari74 [83]
Caps Lock keys 
Hope this helps you
6 0
3 years ago
Other questions:
  • Using-R,-create-a-linear-model-to-represent-the-coefficients-for-the-objects-fw2-and-fwe-data..
    10·1 answer
  • Write a C++ program that determines if a given string is a palindrome. A palindrome is a word or phrase that reads the same back
    6·1 answer
  • A/an ________is a device used to protect computers against surges and spikes in power.
    14·1 answer
  • When users talk about font size,
    10·2 answers
  • Which of the following most closely illustrates the correct format of the comparison in a conditional statement?
    10·1 answer
  • Given the following code:
    8·1 answer
  • Qué es que puede pasar lo mismo con la galaxia<br>​
    13·1 answer
  • Besides your computer, where else can you find and use an operating system?
    11·1 answer
  • Which step in the penetration testing life cycle is accomplished using rootkits or trojan horse programs? maintain access gain a
    12·1 answer
  • Cycle technology implemented a dibs initiative last year for one of the manufacturing sites. however, the initiative is not prog
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!