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
PLEASE HELP!!!!!! ASAP
NNADVOKAT [17]

Answer:

use a wizard or use a design view

Explanation:

i took the test

4 0
3 years ago
Read 2 more answers
Assume that a gallon of paint covers about 350 square feet of wall space. Create anapplication with a main() method that prompts
Elena-2011 [213]

Answer:

import java.util.Scanner;

public class PaintClculator {

   public static void main(String[] args) {

Scanner in = new Scanner(System.in);

       System.out.println("Enter Values for length, width, and height of the room");

       double length = in.nextDouble();

       double width = in.nextDouble();

       double height = in.nextDouble();

       double wallArea = calculateWallArea(length,width,height);

       double noGallons = calculatePaint(wallArea);

       double price = price(noGallons);

       System.out.println("Price is: "+ price);

   }

   // Creating Method to Calculate Wall Area

   public static double calculateWallArea( double length, double width, double height){

       // formular for the surface area of a room Area=2*length*heigth+2*width*height+lenth*width

       double Area = 2*length*height+2*width*height+length*width;

       System.out.println("Wall Area: "+Area);

       return Area;

   }

   //Creating method to calculate amount of paint

   public static double calculatePaint(double Area){

       double noGallons = Area/350;

       System.out.println("Number of gallons: "+noGallons);

       return noGallons;

   }

   // Creating Method Calculate Price

   public static double price(double noGallons){

       return noGallons*32;

   }

}

Explanation

  1. Created Three Methods in all; calculateWallArea(), calculatePaint(), and price()
  2. Method calculateWallArea() calculates area based on this formula Area=2*length*heigth+2*width*height+lenth*width
  3. The value of Area is passed to method calculatePaint() Which calculates the number of gallons required to cover the area given that one gallon covers 350 wall space
  4. Method price() calculates and dis[plays the price by calling method calculatePaint() that returns number of gallons. since one gallon is 32$
3 0
2 years ago
Write a function named ilovepython that prints out I love Python three times. Then, call that function.
Brums [2.3K]

Answer:

The program to this question can be described as follows:

Program:

def ilovepython(): #defining a method

   for i in range(3): #defining a loop that print messasge three times

       print('I love Python')#print messasge

ilovepython() #calling the method

Output:

I love Python

I love Python

I love Python

Explanation:

Description of the python program can be described as follows:

  • In the above Python program, a method "ilovepython" is defined, inside the method a for loop is used, inside the loop print method is used, that print the message "I love Python".
  • In python for loop is used to iterate over series and we can execute a set of statements with the loop, tuple, series, once for each element in the list.
8 0
2 years ago
When companies want people to think their brand is wholesome, trustworthy, and confident, this is the color most often chosen.
notsponge [240]
A. Blue. When you want to be viewed as trustworthy and cool you would use the color blue.
6 0
3 years ago
Read 2 more answers
How ICT has helped education to grow through progression?
Vsevolod [243]

Answer:

Hey there!

Explanation:

This is ur answer...

<em>ICTs can enhance the quality of education in several ways: by increasing learner motivation and engagement, by facilitating the acquisition of basic skills, and by enhancing teacher training. ICTs are also transformational tools which, when used appropriately, can promote the shift to a learner-centered </em><em>environment.</em>

Hope it helps!

Brainliest pls!

Have a good day!^^

6 0
1 year ago
Other questions:
  • Chdtp aoxophg gr72 ae9&gt;3 zqqz
    12·1 answer
  • Controlled intersections use some form of which of the following:
    7·1 answer
  • How many answer or point do I answer/need to sent message?
    6·1 answer
  • A ________ is a user-interface component with two states: checked and unchecked. radio button check box menu item submenu item
    5·1 answer
  • You will be given a string, containing both uppercase and lowercase alphabets(numbers are not allowed).
    14·1 answer
  • Which procedure is used as a physical barrier to secure data against unauthorized access in a cloud storage data center?
    6·1 answer
  • Marla wants to transfer photos from her digital camera to her computer. She has plugged the camera's cord into the USB port. Wha
    11·2 answers
  • Which line of code will eliminate the element “calculator” from an array of supplies?
    13·1 answer
  • Please help me with Excel!!! A lot of points!
    11·1 answer
  • How does the use of blocking affect the external sorting algorithm, and how does it change the cost formula
    5·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!