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
Nookie1986 [14]
3 years ago
5

Write two scnr.nextInt statements to get input values into birthMonth and birthYear. Then write a statement to output the month,

a slash, and the year. End with newline. The program will be tested with inputs 1 2000, and then with inputs 5 1950. Ex: If the input is 1 2000, the output is: 1/2000
Computers and Technology
1 answer:
Firlakuza [10]3 years ago
7 0

Answer:

Here is code in Java.

// import package

import java.util.*;

class Main

{   // main method of class

public static void main (String[] args) throws java.lang.Exception

{

   try{

       // variables to store the input

       int birthMonth,birthYear;

       // Scanner class object to read the input

       Scanner scnr=new Scanner(System.in);

       System.out.print("Please enter the birth month:");

       // read the birth month

       birthMonth=scnr.nextInt();

       System.out.print("Please enter the birth year:");

       // read the birth year

       birthYear=scnr.nextInt();

       // print the output

       System.out.println(birthMonth+"/"+birthYear+"\n");

   }catch(Exception ex){

       return;}

}

}

Explanation:

Create two variables "birthMonth" & "birthYear" to store the birth month and birth year.Read the  values of both from user. Print the birth month and birth year separated by a slash("/").

Output:

Please enter the birth month:1                                                                                                

Please enter the birth year:2000                                                                                              

1/2000  

Please enter the birth month:5                                                                                                

Please enter the birth year:1950                                                                                              

5/1950  

You might be interested in
Write a main program that prompts users for 5 integers. Use two separate functions to return (NOT print) the highest and lowest
Soloha48 [4]

Answer:

import java.util.Arrays;

import java.util.Scanner;

public class LatinHire {

   public static void main(String[] args) {

       Scanner in = new Scanner (System.in);

       System.out.println("Enter Five integers");

       int num1 = in.nextInt();

       int num2 = in.nextInt();

       int num3 = in.nextInt();

       int num4 = in.nextInt();

       int num5 = in.nextInt();

       int [] intArray = {num1,num2,num3,num4,num5};

       System.out.println(Arrays.toString(intArray));

       System.out.println("The Maximum is "+returnMax(intArray));

       System.out.println("The Minimum is "+returnMin(intArray));

   }

   public static int returnMax(int []array){

       int max = array[0];

       for(int i=0; i<array.length; i++){

           if(max<array[i]){

               max= array[i];

           }

       }

       return max;

   }

   public static int returnMin(int []array){

       int min = array[0];

       for(int i=0; i<array.length; i++){

           if(min>array[i]){

               min= array[i];

           }

       }

       return min;

   }

}

Explanation:

  1. This is implemented in Java Programming Language
  2. Two Methods are created returnMax(Returns the Maximum Value of the five numbers) and returnMin(Returns the minimum of the five numbers)
  3. In the Main method, the user is prompted to enter five numbers
  4. The five numbers are saved into an array of integers
  5. The returnMax and returnMin methods are called and passed the array as parameter.
  6. The entire array of numbers inputted by the user as well the Max and Min are printed

6 0
3 years ago
When a cells number format is “time” it will show a value in what format
Leokris [45]

The format of time shows a value of time day (what time it is).

When you choose the option of time you can have it displayed in a variety of formats, including military time and a time display that will change with regional time zones,

3 0
3 years ago
Why is it so important to have employees who can critically think?
kiruha [24]
Its important to have employees who can critically think because if they have to make a crucial decision for the job or project he or she is working on that best suits the situation. 
6 0
3 years ago
Read 2 more answers
You receive an e-mail that seems to come from your bank. Clicking on a link in the message takes you to a website that seems to
lions [1.4K]

Answer:

A Phishing Attack

Explanation:

The term "phishing" comes from the combination of the English term "fishing", which means to fish, with the term "phreak", often used to name the first telephony hackers.

It is a type of scam that uses technological mechanisms, usually based on messages, to persuade and deceive people, with a specific objective, which varies from attack to attack.

For example, sending you an email message with a link like a popular social media platform which is meant to trick you into submitting your login details thereby hacking into your account from the hacker's remote location.

3 0
3 years ago
Read 2 more answers
The software/system that helps make sure the retail firm doesn't have a stockout is?
dedylja [7]

The software/system that helps make sure the retail firm doesn't have a stockout is supply chain management software.

Supply chain management is a software that comprehends all the techniques and processes that convert the starting material into the finished or final product. The supply chain management software is cost-effective and time-saving.

Creating a strategy, raw materials, manufacturing, distribution, and returns are the five important ingredients of supply chain management software.

The software helps the retail firm in improving customer service by ensuring that there is a continuous flow of the starting material so that the production process does not stop indefinitely which results in good relationships with the supplier and customer.

The software also performs the functions of processing customer requirements, sourcing, and shipping management.

To know more about supply chain management, click here:

brainly.com/question/28282152

#SPJ4

7 0
2 years ago
Other questions:
  • Need answer quick
    9·1 answer
  • __________________ fonts use binary code to define each pixel of the letter to be displayed.
    8·1 answer
  • Which of the following is not a metamorphic agent?
    8·2 answers
  • WhAt is a jpeg do i look like i know what a jpeg is
    13·1 answer
  • To play a sound during transitions select a sound from - - - - - - list​
    11·1 answer
  • What is the output of the below Java program?
    11·1 answer
  • List how much hard disk capacity you recommend, and write a sentence explaining why.
    8·1 answer
  • nder a Huffman encoding ofnsymbols with frequenciesf1, f2, . . . , fn, what is the longest a codewordcould possibly be
    13·1 answer
  • Suppose you are given a relation R with four attributes ABCD. For each of the following sets of FDs, assuming those are the only
    13·1 answer
  • What is a banner grab?
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!