Computers and Technology , 23.06.2019 01:40 hanjonez

Writing a modular program in visual c++. i am new to this and not sure what i am missing. i am getting the following error: baddate. cpp: in function ‘int main()’: baddate. cpp: 50: 3: error: ‘else’ without a previous ‘if’elsehere are the instructions and code: writing a modular program in c++in this lab, you add the input and output statements to a partially completed c++ program. when completed, the user should be able to enter a year, a month, and a day. the program then determines if the date is valid. valid years are those that are greater than 0, valid months include the values 1 through 12, and valid days include the values 1 through 31.notice that variables have been declared for you. write the simulated housekeeping() function that contains the prompts and input statements to retrieve a year, a month, and a day from the user. include the output statements in the simulated endofjob() function. the format of the output is as follows: month/day/year is a valid date. ormonth/day/year is an invalid date. execute the program entering the following date: month = 5, day = 32, year = 2014. record the output of this program. execute the program entering the following date: month = 9, day = 21, year = 2002. record the output of this /* program name: baddate. cppfunction: this program determines if a date entered by the user is valid. input: interactiveoutput: valid date is printed or user is alerted that an invalid date was entered*/#include bool validatedate(int, int, int); using namespace std; int main(){// declare variablesint year; int month; int day; const int min_year = 0, min_month = 1, max_month = 12, min_day = 1, max_day = 31; bool validdate = true; // this is the work of the housekeeping() method// get the year, then the month, then the daycout year; cout month; cout day; // this is the work of the detailloop() method// check to be sure date is validif(year max_month) // invalid monthvaliddate = false; else if (day max_day) // invalid dayvaliddate = false; // this is the work of the endofjob() method// test to see if date is valid and output date and whether it is valid or notif(validdate == true); {// output statementcout

ansver
Answers: 1
Show answers

Another question on Computers and Technology

Computers and Technology, 21.06.2019 14:20
“create a visual representing the four quadrants (open, blind, hidden and unknown). each quadrant should be the size you perceive it to be with the information you have gathered. review all of your bb information over the johari window to assist you with drawing your four quadrants
Answers: 1
Answer
Computers and Technology, 22.06.2019 15:30
When creating a budget, log fixed expenses before income. after income. after savings. at the top.
Answers: 1
Answer
Computers and Technology, 24.06.2019 02:30
Write the pseudo code for this problem based on what you learned from the video. the purpose is to design a modular program that asks the user to enter a distance in kilometers, and then converts that distance to miles. the conversion formula is as follows: miles = kilometers x 0.6214
Answers: 3
Answer
Computers and Technology, 24.06.2019 14:00
Match the following. 1. the process of reducing repetition of data 2. individual categories of data you will enter in a database 3. a field that is a unique identifier for each record in the table 4. data that is entered in the database 5. a link between two tables records relationship fields data normalization primary key
Answers: 1
Answer
You know the right answer?
Writing a modular program in visual c++. i am new to this and not sure what i am missing. i am getti...
Questions
question
Mathematics, 13.01.2021 02:40
The ratio if men to women working for a company is 3 to 4. If there are 168 employees total, how many women work for the company?...
question
Mathematics, 13.01.2021 02:40
If p(x) = x2 – 1 and g(x) = 5(x-1), which expression is equivalent to (0-9)(x)? O 5(x - 1) – x2 - 1 O (5x - 1) - (x2 - 1) O (x2 - 1) - 5(...
question
Geography, 13.01.2021 02:40
Match each type of region with its description terrain and land formations economic regions hemispheres continents, oceans, and sea...
question
English, 13.01.2021 02:40
100 point giveaway freind me and brainliest and follo and likeee...
question
Advanced Placement (AP), 13.01.2021 02:40
Symptoms of headache nausea dizziness coupled with clamyvalin are signs of. Heat cramps. Heat exhaustion. Heat failure. Heat stroke...
question
Mathematics, 13.01.2021 02:40
Evaluate the expression 2^x- x^22 x −x 2 2, start superscript, x, end superscript, minus, x, squared for x=5x=5x,...
question
Mathematics, 13.01.2021 02:40
Simplify the expression. 7(f + 4) + 6f a. 13f + 4 b. 6f + 7(f + 4) c. 13f + 28 d. 17f...
question
Chemistry, 13.01.2021 02:40
This is last my question can somebody please help me What is the most basic unit of life? OA. cell OB. tissue OC. organ system
question
Mathematics, 13.01.2021 02:40
What is the slope for (-19, -6), (15, 16)...
question
Chemistry, 13.01.2021 02:40
In order to practice how you would respond during an arson investigation, you will be creating a ‘game plan’ or ‘fire investigation timeline’ for what...
question
Biology, 13.01.2021 02:40
The system contains glands that affect muscle activity and growth A. nervous B. digestive C. endocrine D. skeletal...
question
Mathematics, 13.01.2021 02:40
the height of the cylinder is 14 cm its curved surface area is 264 cm to find the volume of the cylinder​...
question
Mathematics, 13.01.2021 02:40
Solve for x. 1(x 3) = 10...
question
Mathematics, 13.01.2021 02:40
(2 + √3) (3 + √2 ) ( had to be 20 characters long)...
question
Mathematics, 13.01.2021 02:40
The graphed line shown below is y = 3 x minus 1. On a coordinate plane, a line goes through (0, negative 1) and (1, 2). Which equation, when graphed w...
question
Chemistry, 13.01.2021 02:40
The maximum contamination level of arsenic ion in a water system is 0.050 parts per million. If the arsenic is present as AsCl 3 , how many gra...
question
English, 13.01.2021 02:40
How does the title of the poem contribute to the development of the poem’s theme? The theme: Something that looks ordinary at first can actually be b...
question
Mathematics, 13.01.2021 02:40
Can someone help me please ...
Computers and Technology, 13.01.2021 02:40
Select the things you can do when working with rows in columns in a spreadsheet: Freeze a row or column Delete a row or column Hide a row...
question
History, 13.01.2021 02:40
As towns grew and merchants expanded trade. What happened? Answer with details. Thank you :)...
Questions on the website: 14143749