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
posledela
3 years ago
7

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 = 1). 1 2 3 4 5 6 7 8 9 10 11 #include using namespace std; int main() { int birthMonth; int birthYear; /* Your solution goes here */ return 0; }
Computers and Technology
1 answer:
vlada-n [284]3 years ago
5 0

Answer:

#include <iostream>

using namespace std;

int main()

{

   int birthMonth, birthYear;

   cout << "Enter your Birth Month and Year" << endl;

   cin>>birthMonth;

   cin>>birthYear;

   cout<<birthMonth;

   cout<<"-";

   cout<<birthYear<<endl;

   return 0;

}

Explanation:

Using C++ Programming Language, Firstly we declare to variables to hold the values for the birthMonth and birthYear. We then used a cout statement to prompt the user to input values for month and year, then three cout statements are used to display the  output according to the question's specification.

You might be interested in
In any *NIX system, after saving a script named "script_name," you need to make it executable so that you can run it. Which comm
REY [17]

Answer/Explanation:

chmod +x script_name

Cheers

4 0
4 years ago
For this project you have been asked to write a program for a local store owner. The store owner wants to keep a record of the n
elena55 [62]

Answer:

see explaination

Explanation:

#include <iostream>

using namespace std;

void display (string* name, double* purchase, int n)

{

cout<<"Name Purchase"<<endl;

cout<<"------------------------"<<endl<<endl;

for(int i=0;i<n;i++)

{

cout<<name[i]<<" "<<purchase[i]<<endl;

}

}

double calculate(double* purchase,int n)

{

double avg, sum=0;

for(int i=0;i<n;i++)

{

sum=sum+purchase[i];

}

avg=sum/n;

return avg;

}

int main()

{

int n;

cout<<"How many customer will you enter? "<<endl;

cin>>n;

string *name=new string[n];

double *purchase=new double[n];

for(int i=0;i<n;i++)

{

cout<<"Enter the customer"<<i+1<<"'s name: "<<endl;

cin>>name[i];

cout<<"Enter that customer's purchase: "<<endl;

cin>>purchase[i];

}

display(name, purchase,n);

double avg=calculate(purchase,n);

cout<<"Average purchase: "<<avg<<endl;

}

See attachment for the screenshot

7 0
3 years ago
this isnt a question but i am looking for anything willing to help me with my work. i have 50 missing assignments just in one cl
Zarrin [17]

Answer:

just find it

Explanation:

ambot lng kay wa mn gd nako to gi gunitan nya wa pd ko nimo gipa bantay nya biskan pag pabantayon ko nimo ilabay jd nakog saba

4 0
4 years ago
Koi friend online hai kya​
Arlecino [84]

Answer:

yes

good afternoon friend

8 0
3 years ago
1. What type of programmer uses HTML application?
jok3333 [9.3K]

Answer:

Front end developers and Full Stack developers

Explanation:

Although most programmers know HTML (HyperText Markup Language), front-end developers who work on making the user's visual experience with an application the best have to be proficient in HTML. It is used to define the structure of web content on a website for example.

Full Stack developers have a strong grasp of the tools and suites a front-end and back-end developer might use to develop complete software

3 0
3 years ago
Other questions:
  • When computers are connected and operate through one main computer, it is called a _________ network
    14·2 answers
  • Which of the following should you NOT do when using CSS3 properties to create text columns for an article element? a. make the c
    12·2 answers
  • What is the outside of an iPhone called?
    9·2 answers
  • 1) List at least five smaller behaviors you could break the complex behavior "brushing my teeth" into.
    14·2 answers
  • True or false: in order to keep yourself and co workers safe, you must be able to recognize electrical hazards
    8·2 answers
  • Display the total number of parking tickets.
    5·1 answer
  • Where is the BIOS stored?<br><br> CPU<br> CMOS<br> RAM<br> Northbridge
    13·2 answers
  • What is the importance of shape in graphic design?​
    5·2 answers
  • Given a string, an integer position, and an integer length, all on separate lines, output the substring from that position of th
    10·1 answer
  • Chantal has configured the network at her company's new headquarters with a number of VLANs. All devices joined to the individua
    7·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!