Write two scanf 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 Note: The input values come from user input, so be sure to use scanf statements, as in scanf("%d", &birthMonth), to get those input values (and don't assign values directly, as in birthMonth = 1).

Respuesta :

Answer:

The program can be found in the explanation part while the output is attached as files.

Explanation:

The program to display the birth month and year, is given below:

//Include the necessary library files.

#include "stdafx.h"

#include <iostream>

using namespace std;

//Start the main() function.

int main()

{

//Declare the necessary variables.

int birthMonth;

int birthYear;

//Prompt the user to enter the birth month.

cout << "Enter the birth month: ";

//Store the input.

cin >> birthMonth;

//Prompt the user to enter the birth year.

cout << "Enter the birth year: ";

//Store the input.

cin >> birthYear;

//Display the output.

cout << "The birth date is: " << birthMonth << "/" << birthYear << endl;

system("pause");

return 0;

}

Ver imagen kendrich
Ver imagen kendrich

The program is a sequential program, and does not require loops or conditional statements

The program in C, where comments are used to explain each line is as follows:

#include <stdio.h>

int main() {  

   //This declares the variables

   int year, month;

   //This gets input for month

   scanf("%d", &month);

   //This gets input for year

   scanf("%d", &year);

   // This prints the inputs, separated by slash

   printf("%d/%d", month, year);

   

   return 0;

}

Read more about sequential programs at:

https://brainly.com/question/17970226