Question

Write a CORAL program that takes as input a list of non-negative numbers ending with a negative, and outputs the list with three spaces after each number. If the input is 5 10 40 30 -3, the output is:

Write a program that takes as input a list of non-negative numbers ending with a negative, and outputs the list with three spaces after each number. If the input is 5 10 40 30 -3, the output is: 5 10 40 30 



0 0
Add a comment Improve this question Transcribed image text
Request Professional Answer

Request Answer!

We need at least 9 more requests to produce the answer.

1 / 10 have requested this problem solution

The more requests, the faster the answer.

Request! (Login Required)


All students who have requested the answer will be notified once they are available.
Know the answer?
Add Answer to:
Write a CORAL program that takes as input a list of non-negative numbers ending with a negative, and outputs the list with three spaces after each number. If the input is 5 10 40 30 -3, the output is:
Your Answer:

Post as a guest

Your Name:

What's your source?

Earn Coins

Coins can be redeemed for fabulous gifts.

Similar Homework Help Questions
  • Write a program that reads a list of integers ending with a negative, and that then...

    Write a program that reads a list of integers ending with a negative, and that then outputs that list in reverse. After the negative that ends the list, a character indicates what character should separate the output integers. If the input is: 3 5 2 - 1 * the output is: 2*5*3 LAB ACTIVITY 7.16.1: LAB: Reverse a list, with separating characters 2 / 10 main.cpp Load default template... 6 7 8 int numbers [100],i=0, num, size; char character; cin>>num;...

  • Write a program that takes in a line of text as input, and outputs that line...

    Write a program that takes in a line of text as input, and outputs that line of text in reverse. You may assume that each line of text will not exceed 50 characters. The program repeats, ending when the user enters "Quit", "quit", or "q" for the line of text. Ex: If the input is: Hello there Hey quit then the output is: ereht olleH уен Hint: Use the fgets function to read a string with spaces from the user...

  • in coral. Statistics are often calculated with varying amounts of input data. Write a program that...

    in coral. Statistics are often calculated with varying amounts of input data. Write a program that takes any number of non-negative integers as input, and outputs the average and max. A negative integer ends the input and is not included in the statistics. Ex: When the input is 15 20 0 5 -1, the output is: 10 20 You can assume that at least one non-negative integer is input.

  • 10) Write a program that inputs five numbers and determines the number of negative numbers input,...

    10) Write a program that inputs five numbers and determines the number of negative numbers input, the number of positive numbers input and the number of zeros input. An easy way to create a counter is given in the example below: int counter 0; initializes the counter counter counter +1;//increments the counter each time is used. Note: Output should read as shown below where # replaces the number of inputs and it is displayed on a table format] (40 pts.)...

  • 4. Write a C++ program Write a program that takes as input five numbers and outputs...

    4. Write a C++ program Write a program that takes as input five numbers and outputs the mean (average) and standard deviation of the numbers. If the numbers are xi, Xa, x3, Xa, and xs, then the mean is x = (Xi + X2 + X3+ X4 + Xs)/5 and the standard deviation is: Your program must contain at least the following functions: a function that calculates and returns the mean and a function that calculates the standard deviation. 30...

  • o Write a function that outputs even numbers less than the input number. • Function name...

    o Write a function that outputs even numbers less than the input number. • Function name should be 'evenprint'. • A number is given as input to the function. . The function must return a list of even numbers def evenprint(num): #write statement >[2, 4, 6, 8, 10, 12, 14, 16, 18, 20, 22, 24, 26, 28, 30, 32, 34, 36, 38, 40, 42, 44, 46, 48, 50, 52, 54, 56, 58, 60, 62, 64, 66, 68, 70, 72, 74,...

  • Write a program called SmallestLargest.java which outputs the biggest and smallest numbers in a list of...

    Write a program called SmallestLargest.java which outputs the biggest and smallest numbers in a list of numbers entered by the user. Ask the user for a terminating value which should be entered again when they are done inputting the list of numbers. First output the biggest number and then the smallest number. There must be at least 1 number in the list. YOU MUST USE THE IO MODULE FOR INPUT/OUTPUT. Report bad input via IO.reportBadInput() and exit on error. Example:...

  • USING C# 1. Write a program that takes outputs a string, an integer and a floating-point number s...

    USING C# 1. Write a program that takes outputs a string, an integer and a floating-point number separated by commas. Sample output: Bob Marley, 20, 5.2 2. 2. Write a program that asks the user for a string of letters of any size (no spaces), and finally a special character (values 33 to 47 in the Ascii table, or ‘!’ to ‘/’). Generate a random number of any size, integer or floating point, and combine those three pieces of information...

  • Please show output in python Write a program that takes a date as input and outputs...

    Please show output in python Write a program that takes a date as input and outputs the date's season. The input is a string to represent the month and an int to represent the day. Ex: If the input is: April 11 the output is: Spring In addition, check if the string and int are valid (an actual month and day). Ex: If the input is: Blue 65 the output is: Invalid The dates for each season are: Spring: March...

  • Write a program that takes in a line of text as input, and outputs that line of text in reverse.

     4.24 LAB: Print string in reverse Write a program that takes in a line of text as input, and outputs that line of text in reverse. The program repeats, ending when the user enters "Quit", "quit", or 'q" for the line of text. Ex: If the input is: Hello there Hey quit the output is: ereht ollel yeH

ADVERTISEMENT
Free Homework Help App
Download From Google Play
Scan Your Homework
to Get Instant Free Answers
Need Online Homework Help?
Ask a Question
Get Answers For Free
Most questions answered within 3 hours.
ADVERTISEMENT
ADVERTISEMENT
ADVERTISEMENT