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
laila [671]
3 years ago
11

Write two Get statements to get input values into first Month and first Year. Then write three Put statements to output the mont

h, a slash, and the year. Ex: If the input is 1 2000, the output is:

Computers and Technology
2 answers:
AveGali [126]3 years ago
6 0

Answer:

// Scanner class is imported

import java.util.Scanner;

// InputExample class to hold the program

public class InputExample {

// main method to begin program execution

public static void main(String args[]) {

// Scanner object scnr is created

Scanner scnr = new Scanner(System.in);

// variable birthMonth is declared

int birthMonth;

// variable birthYear is declared

int birthYear;

// birthMonth is initialized to 1

birthMonth = 1;

// birthYear is initialized to 2000

birthYear = 2000;

// birthday is displayed

System.out.println("1/2000");

// prompt is displayed asking user to enter birthMonth

System.out.println("Enter birthMonth:");

// birthMonth is received using Scanner object

birthMonth = scnr.nextInt();

// prompt is displayed asking user to enter birthYear

System.out.println("Enter birthYear:");

// birthYear is received using Scanner object

birthYear = scnr.nextInt();

// the birthday format is displayed

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

}

}

Explanation:

The program is written in Java as required and it is well commented.

An image depicting the full question is attached.

babunello [35]3 years ago
4 0

Answer:

Since you are not mentioning the programming language. We are using C++ to complete the above program.

Explanation:

PROGRAM:

//Declare the header file

#include <iostream>

//Declare the namespace

using namespace std;

//Define the main funcion

int main()

{

//Declare the variable to hold the month of birth

int birthMonth;

//Declare the variable to hold the year of birth

int birthYear;

//Print the string

cout<<" Enter birth month and birth year separated by space"<<endl;

//Get the value of month from the user

cin >> birthMonth;

//Get the value of year from the user

cin >> birthYear;

//Print he value of month

cout << birthMonth;

//Printing the slash

cout<<"/";

//Print the year

cout << birthYear;

//Return "0"

return 0;

}

You might be interested in
What was the biggest challenge you faced in getting to where you are today and how did you overcome it? Peer counseling
Solnce55 [7]
The biggest challenge I still am faced with today is loosing weight, it can be different for everyone but that is mine. I overcomed it by eating a lot better and not so much junk food.
7 0
3 years ago
Emily has to create an audio-visual presentation on animated movies. Which input device will she be LEAST likely to use while cr
tiny-mole [99]
Joystick? It would be helpful if you listed the choices :)
3 0
4 years ago
Plz help me I need this doneee
Vladimir79 [104]
Answer: I think it’s true
5 0
3 years ago
What forms the foundation of cloud computing?
makkiz [27]
Virtualization. To enable easy deployment and scalability, it should be easy to spin up new machines on request. Virtualization offers the possibility to clone operating systems and deploy solutions independent of the actual hardware.
8 0
4 years ago
Hub is a _________ device and switch is a ________ device.
Galina-37 [17]
The answer is B) broadcast, unicast
Hub is a broadcasting device and switch is a uni-casting device.
4 0
3 years ago
Other questions:
  • Write a program that calculates and displays a person’s body mass index (BMI). The BMI is often used to determine whether a pers
    11·1 answer
  • What are two factors that cause technology to progress
    9·2 answers
  • 20 POINTS!
    15·1 answer
  • A _____ is a collection of binary digits, including message data and control characters for formatting and transmitting, sent fr
    10·1 answer
  • QUESTION 56 Use the Windows ________ to check on a nonresponsive program. Backup utility Error-checking System Restore Task Mana
    6·1 answer
  • What is the first phase in which a software program is usable enough to test?
    14·1 answer
  • Question #4
    8·1 answer
  • What woman ran for president on the National Equal Rights Party, receiving 4,149 votes in 6 states in 1884?
    5·1 answer
  • Gina is a database user and her supervisor has asked her to generate a report from the structured database. Gina does not know h
    7·1 answer
  • What was one specific feature, other than the rotors, that made the enigma so difficult to crack?.
    11·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!