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
What environmental concern will hybrid cars address?
Over [174]
The answer to the above question is:
d. all of the above
5 0
4 years ago
Read 2 more answers
Guess The Song: <br> What Popping Brand New Whip Just Hopped In, I Got options
Georgia [21]

Answer:

its called whats poppin lol

Explanation:

:)

7 0
3 years ago
What is network hardware?
vovangra [49]
Modem, router, switch, server, etc. these are hardware meant to facilitate the transfer or storage of remote information.
8 0
3 years ago
Initialize the tuple team_names with the strings 'Rockets', 'Raptors', 'Warriors', and 'Celtics' (The top-4 2018 NBA teams at th
dexar [7]

Answer:

Following is the code in python language

team_names = ('Rockets','Raptors','Warriors','Celtics')#holding the string value

print(team_names[0],team_names[1],team_names[2],team_names[3])#display

Output:

Rockets Raptors Warriors Celtics

Explanation:

Following is the description of above statement .

  • Create a dictionary "team_names" that is holding the string value Rockets Raptors Warriors and Celtics.
  • Finally we used the print function in that function we pass the index of corresponding dictionary i.e team_names[0] . it will display the first index value  similarly we pass  team_names[1], team_names[2]  team_names[3].
8 0
3 years ago
Bakit mahalaga na marunong tayong gumamit ng makina?
jeka94

Answer:

para mabilis ang gawa

Explanation:

hope it helps

5 0
3 years ago
Other questions:
  • Notes page view and Outline view are found in the<br> tab.<br> File<br> O Status<br> View<br> Page
    8·1 answer
  • Hw to gain more knowledge ​
    6·1 answer
  • What does PHP stand for?
    9·2 answers
  • A(n) _________ is any system resource that is placed onto a functional system but has no normal use for that system. If it attra
    15·1 answer
  • Write a program to complete the task given below: Ask the user to enter any 2 numbers in between 1-10 and add both of them to an
    8·1 answer
  • I have to write this in Java, but i've never even learned it before and i'm completely lost
    12·1 answer
  • write a program that asks the user for a month number and displays the number of days that month has?
    7·2 answers
  • GOOD EVENING, FRIENDS, I WANT TO ASK ON THE ACCOUNT OF HIS NAME‏BENJEMIN360 . THIS ANSWERS ARE VERY WONDERFUL, BUT I CAN'T COMMU
    6·1 answer
  • Screen reading for extended periods can cause___________ _____________, so the position the monitor to minimize glare and give y
    5·1 answer
  • Data mining requires specialized data analysts to ask ad hoc questions and obtain answers quickly from the system. select one: t
    12·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!