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
expeople1 [14]
2 years ago
11

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

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 Note: The input values come from user input, so be sure to use cin statements, as in cin >> birthMonth, to get those input values (and don't assign values directly as in birthMonth
Computers and Technology
1 answer:
snow_lady [41]2 years ago
6 0

Answer:

// here is code in c++.

#include <bits/stdc++.h>

using namespace std;

// main function

int main() {

// variables to read birth month and year

int birthMonth,birthYear;

cout<<"Enter the birth month:";

// read the birth month

cin>>birthMonth;

cout<<"Enter the birth Year:";

// read the birth year

cin>>birthYear;

// print the output

cout<<birthMonth<<"-"<<birthYear<<endl;

return 0;

}

Explanation:

Declare two variables "birthMonth" and "birthYear". Read the value of birthMonth and birthYear from user. Then print the birth month and birth year and a dash(-) in between them.

Output:

Enter the birth month:1                                                                                                                                      

Enter the birth Year:2000                                                                                                                                    

1-2000  

Enter the birth month:5                                                                                                                                      

Enter the birth Year:1950                                                                                                                                    

5-1950

You might be interested in
Write a program that computes the minimum, maximum, average and standard deviation of the population over time for a borough (en
IrinaK [193]

Answer:

import pandas as pd #importing pandas library as pd

import matplotlib.pyplot as plt #importing matplotlib.pyplot as plt

pop=pd.read_csv('nycHistPop.csv') #reading the csv file

borough=input('Enter borough name:') #asking the user for borough namme

# image=input('Enter image name:')

# pop['Fraction']=pop[borough]/pop['Total']

# pop.plot(x='Year', y='Fraction')

print("Minimum population",pop[borough].min()) #printing the minimum population of borough

print("Maximum population",pop[borough].max()) #printing the maximum population of borough

print("Average population",pop[borough].mean()) #printing the average population of borough

print("Standard deviation",pop[borough].std()) #printing the standard deviation of borough

# fig=plt.gcf()

# fig.savefig(image)

Explanation:

4 0
3 years ago
I am programming and i want to find the amount of move functions i need to complete the full square. the square is 65 by 70 circ
Ahat [919]
Not to be rude, but this is elementary school. How would anyone know this?
8 0
3 years ago
A small program that sends itself to other computers, rather than relying on user actions, is a
PSYCHO15rus [73]

Virus.

A virus is a malicious program or script that Spreads. 

Malware, however, will not spread. 

Viruses can spread without a victim's permission because it is automated to do so. 

For example, the Melissa virus would look like a file attachment that used reverse psychology to make you open it. From there, it goes through the first 50 email contacts stored on your computer and sends the virus to them from your computer. 
8 0
3 years ago
Compunere toamna minim 15 randuri<br> VA ROGGGGG!!!!!!!!!!!
Natasha2012 [34]
Answer: what
explanation: what??
7 0
2 years ago
When selecting Internet research sources, you should verify that the source is _____ and _____.
Naddik [55]
Current and credible
7 0
2 years ago
Other questions:
  • Carlos owns a hardware store. He currently is not using any software to track what he has in the store. In one to two sentences,
    9·2 answers
  • What are some good editing software apps for pc?
    11·1 answer
  • Which password is an ideal and secure password?
    6·2 answers
  • Tony is in charge of all presentations for a Fortune 500 pharmaceutical company. In addition to creating powerful and persuasive
    9·1 answer
  • In the writing process, after you ve narrowed down your topic, you can use the _______ technique to view a topic from different
    9·2 answers
  • To prevent unauthorized access and use, at a minimum a company should have a written __________ that outlines the activities for
    6·1 answer
  • An algorithm written out in plain English statements is called __________.
    8·1 answer
  • Which of the following statements is used to terminate the program when closing the frame?
    5·1 answer
  • Methods that require you to use an object to call them are called ____ methods.1. accessor
    7·1 answer
  • Based on a Supreme Court ruling, an Internet-based merchant needs to charge sales tax only when _____.
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!