Create a program that displays the number of days

Assignment Help C/C++ Programming
Reference no: EM13738418

Program: Create a program that displays the number of days in a month. Use a 12-element one-dimensional array to store the number of days in each month (use 28 for the number of days in February). Code the program so that it displays the number of days in the month corresponding to the number entered by the user.

For example, when the user enters the number 1, the program displays "There are 31 days in the month of January". The program should display an error message if the user enters an invalid number. Put a loop in the program so that the user can input multiple months. Use a sentinel of -1 to exit the program.

I'm not sure how to solve the question. Can anyone help me?

Reference no: EM13738418

Questions Cloud

Divide-and-conquer two-dimensional closest-pair algorithm : Suppose the version of the divide-and-conquer two-dimensional closest-pair algorithm in which, instead of presorting input set P, we simply sort each of the two sets Pl and Pr in nondecreasing order of their y coordinates on each recursive call.
Technical meaning of conflict of interest : Question 1: The technical meaning of conflict of interest is that:
Parallel numeric arrays : Create and code a program that uses three parallel numeric arrays of size 6. The program searches one of the arrays and then displays the corresponding values from the other two arrays.
Compute the magnitude of the static frictional force : What is the magnitude of the static frictional force? Write your answer in terms of m, g, us, phi. and theta. What is the maximum angle theta such that the block won't slide.
Create a program that displays the number of days : Create a program that displays the number of days in a month. Use a 12-element one-dimensional array to store the number of days in each month
What are four examples of how direction can be used : What are four examples of how "direction" can be used in an effective publication?
Find the distance that string takes to spin the spool : Imagine that you wrap a string around a 5.0-kg spool whose radius is 5.0 cm. How long will String take to spin the spool up from rest to a rotation rate of 10 turns per second?
Design a 20-page high quality brochure : you have been hired to design a 20-page high quality brochure. Indicate the type of paper weight, opacity, brightness, and finish you would recommend for this project. Provide justification
Write a sum-of-products expression for the 8x1 multiplexer : Design a 8x1 multiplexer using seven 2x1 multiplexers. Please label all signals clearly.

Reviews

Write a Review

C/C++ Programming Questions & Answers

  Generate a main program which initializes

Generate a main program which initializes your data array to be sorted - be careful with your array index numbers. You can use a random number generator to generate entries for the array.

  Aims the main purpose of the assignment is to let you

aims the main purpose of the assignment is to let you perform operations on les manipulate structures manipulate

  Review structured programming concepts

Review structured programming concepts - Describe the main concepts of the object-oriented programming paradigm.

  Directiontechnical paper memory managementthe intent of

directiontechnical paper memory managementthe intent of this paper is to provide you with an in depth knowledge of how

  Write a program that asks the user to enter two numbers

Write a program that asks the user to enter two numbers. The program should use the conditional operator to find which number is the smaller and which is the larger.

  Represent an instruction supported by simpletron

Implementation contains a Simpletron class and several supporting Instruction classes

  Write a program that allows users to enter a dollar amount

Write a program that allows users to enter a dollar amount for their bank account balance at the beginning of the month.

  Write fibonacci function that calculates the nth number

The Fibonnacci numbers begin with the numbers 0 and 1 and have the property that each succeeding number is the sum of the two preceding numbers. For xample: 0,1,1,2,3,5,8,13,21,...etc. Write Fibonacci() function that calculates the n'th Fibonacci ..

  Show that regularity is preserved under the shift operation

Show that the regularity is preserved under the shift operation - I have the answer already but i do not understand

  How a base version of this assignment works

For this assignment you are to create an interactive moving sign in the context of a cityscape street scene. Click the link below to see how a base version of this assignment works. Type a message in the long blank slot at the top left, and then clic..

  Monkey business, a local zoo

Monkey Business, a local zoo, wants to keep track of how many pounds of food each of its three monkeys eats each day during a typical week. Write a program that stores this information in a two-dimensional 3 7 array, where each row represents a di..

  Write menu driven program that make coffee shop operational

Write a menu-driven program that will make the coffee shop operational and Buy coffee in any size and in any number of cups.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd