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
The algorithm for solving the problem of average of five (5) numbers​
PilotLPTM [1.2K]

Answer:

Explanation:

Denote the five numbers as a, b, c, d and e.

The average is:

(a + b + c + d +e) ÷ 5.

Easily:

Learn how to do input and output operations in your programming language of choice.

Learn what average is (see Arithmetic mean - Wikipedia)

Learn how to code arithmetic operations in your PL of choice.

Put all that together and code the program.

Oh, did you expect the code snippet? Sorry, I don’t do peoples’ homework for them on principle. Homework is for you to learn something. If you can’t be bothered, accept that you’ll fail your class. If you want to pass, LEARN.

3 0
3 years ago
You can delete any content control by ____ it, and then clicking remove content control on the menu that opens.
Bezzdna [24]
<span>You can delete any content control by Right Clicking it, and then clicking remove content control on the menu that opens.</span>
8 0
3 years ago
What should a pwc operator do to minimize the risk of accident or injury?
Natasha_Volkova [10]
PWC stands fro personal water craft (aquascooter, jet bike, jet ski, wave runner, ski free, motorised surfboard etc.). The operator of PWC must be at least 16 years old.
In order to minimize the risk of accident or injury the PWC operator must follow several rules:
- the pwc operator should know the boating rules
- to monitor the speed of the vessel to ensure that a safe speed is being maintained.
- to adhere to the 5 knot rule (approximately 10kph) when close to shore, other boats (including boats at anchor) around dive flags and swimmers, fixed structures (ramps and jetties)
3 0
3 years ago
if i were to plug this in my ps4 usb port and connect it to the tv would it work please and if so please explain
Brilliant_brown [7]
Probably, most likely yes. this is just basically adding a bit of extra length. the ps4 port goes in the end and the part for the tv acts as a hdmi cord.
4 0
3 years ago
Read 2 more answers
19 POINTS! (Excel) Use the drop-down menus to complete the steps for opening and using the Format Cells dialog box to change fon
Maksim231197 [3]

Explanation: right click and font

5 0
3 years ago
Read 2 more answers
Other questions:
  • Create a funtion makeStudent(studentlist) where studentlist is your list of Student namedtuples The function should do the follo
    13·1 answer
  • How do you convert a decimal to binary?
    9·2 answers
  • Circular errors are caused by adding the cell name of a/an _______ cell to a formula.
    11·2 answers
  • For which type of long-distance call do you need to tell the operator the name of the person to whom you wish to speak?
    10·1 answer
  • The physical parts of the computer are known as?
    14·1 answer
  • An administrator has created a new custom object in a sandbox environment and now is ready to deploy in production. How can the
    11·1 answer
  • Which symbol is at the beginning and end of a multiline comment block? ### &amp;&amp;&amp; %%% """
    14·1 answer
  • Hi there! I just started my beginner computer science class and I was wondering if anyone wants to help with an assignment i'm h
    15·1 answer
  • What are styles? built-in conditional formatting rules formatting applied with the Format Painter defined combinations of format
    15·2 answers
  • Where can formatting features be found ?! Need help asp !‍♀️
    9·1 answer
Add answer
Login
Not registered? Fast signup
Signup
Login Signup
Ask question!