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
Zepler [3.9K]
3 years ago
10

Complete main() to read dates from input, one date per line. Each date's format must be as follows: March 1, 1990. Any date not

following that format is incorrect and should be ignored. Use the substring() method to parse the string and extract the date. The input ends with -1 on a line alone. Output each correct date as: 3/1/1990.
Ex: If the input is:

March 1, 1990
April 2 1995
7/15/20
December 13, 2003
-1
then the output is:

3/1/1990
12/13/2003
Computers and Technology
1 answer:
Airida [17]3 years ago
3 0

Answer:

Explanation:

The following code uses the requested method and while loop in order to continue asking the user for inputs until the -1 input is passed and the program ends, outputting the correct format dates. Due to technical difficulties I had to add the code as a txt file attached below. The picture below shows the output of the code as requested using the test inputs provided.

Download txt
<span class="sg-text sg-text--link sg-text--bold sg-text--link-disabled sg-text--blue-dark"> txt </span>
ec9086bcbf2547784f036fbb9d68eba1.jpg
You might be interested in
Which is a sentence fragment?
ehidna [41]
C is a sentence fragment it does not have a verb
5 0
3 years ago
How do you go about inserting additional worksheets into a workbook?
kicyunya [14]
The correct answer is D. All of the methods listed above are ways of inserting new sheets into a workbook.
6 0
3 years ago
Which item best describes fiber optic transmission?
sveticcg [70]

Answer:

a

Explanation:

analog signal sent through tiny glass strands

6 0
3 years ago
Which design principle indicates the degree of darkness or lightness of a color in a design? _________is the degree of darkness
Svetlanka [38]
It's value, I believe so atleast.
8 0
3 years ago
Higher resolution images mean they can be enlarged better, <br> True or false
ella [17]

Answer:

False

Explanation:

High resolution just mean It looks better

6 0
3 years ago
Read 2 more answers
Other questions:
  • HTTP is the protocol that governs communications between web servers and web clients (i.e. browsers). Part of the protocol inclu
    5·1 answer
  • Create a detail report that will display all SCR courses in alphabetical order, with the course name and the instructor name in
    5·1 answer
  • ____________ hackers break into systems legally for non-malicious reasons such as to test system security vulnerabilities
    7·2 answers
  • Your motherboard supports dual channeling and you currently have two slots populated with DIMMs; each module holds 2 GB. You wan
    6·2 answers
  • Which popular file format loses some of the information from the image? JPEG TIFF RAW NEF
    12·1 answer
  • 1. What are you going to do if someone ask for your personal information online?​
    12·2 answers
  • ____ a device receiving a process variable
    12·1 answer
  • Hurry please i need this ASAP<br><br>What might be some advantages to keeping CSS and HTML separate?
    8·1 answer
  • It took her 9 more months but Marina has managed to save the full $725 plus more to cover fees to pay off the pay-day loan compa
    9·1 answer
  • 5. What skill is unique to reading online?
    14·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!