Write a program that accepts a date from the user

Assignment Help Electrical Engineering
Reference no: EM13279618

Write a program that accepts a date from the user in the form mm/dd/yyyy and then displays it in the form month dd, yyyy, where month is the written name of the month. Store the month names in an array that contains pointers to strings. You must not allow a user to enter an invalid date. Keep asking until they make a valid entry. You should make the calculation to determine if the user has entered a valid year when they enter February 29. Leap years occur during the years that are evenly divisible by four. Also, years that are divisible by 100 are not leap years, unless they are also divisible by 400. Future dates are acceptable. Two example runs are shown below. User input is underlined.

Enter a date (mm/dd/yyyy): 2/17/2021
You entered the date February 17, 2021.

Enter a date (mm/dd/yyyy): 2/32/2022
You entered an invalid date; please try again.
Enter a date (mm/dd/yyyy): 2/22/2022
You entered the date February 22, 2022.

Reference no: EM13279618

Questions Cloud

Design a combinational circuit that detects an error : Design a combinational circuit that detects an error in the representation of decimal digit in Excess-3. The output of the circuit must be equal to logic-1 when the inputs contain any one of the six invalid Excess-3 codes.
What is nominal interest rate on a four-year u.s. government : The default premium is 1 percent. The maturity risk premium on four year bonds is 0.50%. What is the nominal interest rate on a four-year U.S. government bond?
What are the four speeds available for each resistor : A 1/10hp motor has a 1000 rpms with 20v across the armature and series winding there are three speed control switches. The motor speed decreases linearly what are the four speeds available if each resistor is .54 ohms.
What is the sustainable rate of growth : The Green Giant Has a 5 perecnt profit margin and a 40 percent dividend payout ration the total assest turnover is 1.40 and the equilty militiplier is 1.50. What is the sustainable rate of growth?
Write a program that accepts a date from the user : Write a program that accepts a date from the user in the form mm/dd/yyyy and then displays it in the form month dd, yyyy, where month is the written name of the month. Store the month names in an array that contains pointers to strings.
What must the coupon rate be on the bonds : Osbourne Corporation has bonds on the market with 16.0 years to maturity, a YTM of 10.5 percent, and a current price of $943. The bonds make semiannual payments. What must the coupon rate be on the bonds?
What is the final temperature of the water cup and bear : You drop a 297-g silver figure of a polar bear into the 203-g aluminum cup of a well-insulated calorimeter containing 257 g of liquid water at 21.7°C. What is the final temperature of the water, cup, and bear
Calculate the best-case and worst-case npv figures : Calculate the best-case and worst-case NPV figures. (Negative amounts should be indicated by a minus sign. Do not round intermediate calculations and round your final answers to 2 decimal places. (e.g., 32.16))
Find magnetic field intensity at origin use magnetic field : A constant current I is flowing in a semi infinite loop. Find magnetic field intensity at the origin: H(0,0,0). Use magnetic field intenisty for a piece of wire.

Reviews

Write a Review

Electrical Engineering Questions & Answers

  Lithium ion battery technology

The paper includes Lithium ion battery technology with its advantages and disadvantages. The paper discusses about the Lithium air battery in which detailed reactions of Lithium with air including nonaqueous as well as aqueous are given.

  Power transformers and tariffs

Construction of different types of power transformer, significant energy savings

  Paper on orthogonal frequency-division multiplexing

This document is shown a paper on Orthogonal frequency-division multiplexing with advantages, disadvantages and uses.

  Function of the hmi in a scada system

This assignment contains electronics engineering questions like State the commonly found components of a SCADA (Supervisory control and data acquisition) system. and decribe the function of the HMI in a SCADA system.

  Resultant waveform of the odd harmonic series

Prepare an Excel graph showing the individual components and summated resultant waveform of the odd harmonic series resulting in an approximate square wave.

  Explain scada system

Explain the function of the HMI in a SCADA system.

  Design a 2-digit 24 second shot-clock

Design a 2-digit 24 second "shot-clock" countdown timer with pushbutton controller.

  Model a discrete-time system

To understand di erent signal models To be able to model a discrete-time system and design simple signal processing algorithms.

  Draw a relay construction diagram

Draw a relay construction diagram and briefly explain the operation of a relay.

  Frequency division multiplexing

Write a short technical report on Frequency Division Multiplexing

  Impact of electron energy

Briefly discuss the impact of electron energy, electron current and target on the Bremsstrahlung generated.

  Traffic light controller

The schematic of the traffic light controller

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