I am looking for Coral assistance and nothing wlse please.  Write a program that first reads a list of 5 integers from input. Then, read another value from the input, and output all integers less than or equal to that last value. Ex: If the input is: 50 60 140 200 75 100 the output is: 50 60 75 For coding simplicity, follow every output value by a space, including the last one. Then, output a newline. Such functionality is common on sites like Amazon, where a user can filter results.

Database System Concepts
7th Edition
ISBN:9780078022159
Author:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Chapter1: Introduction
Section: Chapter Questions
Problem 1PE
icon
Related questions
Question

I am looking for Coral assistance and nothing wlse please. 

Write a program that first reads a list of 5 integers from input. Then, read another value from the input, and output all integers less than or equal to that last value.

Ex: If the input is:

50 60 140 200 75 100

the output is:

50 60 75

For coding simplicity, follow every output value by a space, including the last one. Then, output a newline.

Such functionality is common on sites like Amazon, where a user can filter results.

Expert Solution
Algorithm:

Step-1: Start

Step-2: Declare an array arr of size 5 and variable searchValue

Step-3: Take input for array elements and searchValue from user

Step-4: Start a loop from i=0 to less than 5

Step-4.1: if searchValue is greater than the arr[i], then print arr[i]

Step-5: Stop 

steps

Step by step

Solved in 4 steps with 2 images

Blurred answer
Follow-up Questions
Read through expert solutions to related follow-up questions below.
Follow-up Question

this is what you responded with while asking for coral help.

Editable Source Code:

#include <iostream>

using namespace std;

int main()
{
    int arr[5], searchValue;
    
    for(int i=0; i<5; i++)
        cin>>arr[i];
    cin>>searchValue;
    
    for(int i=0; i<5; i++){
        if(searchValue >= arr[i])
            cout<<arr[i]<<" ";
    }
    
    return 0;
}

That is obviously C++ NOT Coral.  Here was the original question I asked... which very clearly startes that I am asking for help IN CORAL. this is the 4th time this month you have done this to me. Why am I paying for all these questions when you make me use 2 to even get 1 answer, maybe. So may I please get help for the question below in th4e language I ask for help in?

I am looking for Coral assistance and nothing wlse please. 

Write a program that first reads a list of 5 integers from input. Then, read another value from the input, and output all integers less than or equal to that last value.

Ex: If the input is:

50 60 140 200 75 100

the output is:

50 60 75

For coding simplicity, follow every output value by a space, including the last one. Then, output a newline.

Such functionality is common on sites like Amazon, where a user can filter results.

Solution
Bartleby Expert
SEE SOLUTION
Knowledge Booster
Arrays
Learn more about
Need a deep-dive on the concept behind this application? Look no further. Learn more about this topic, computer-science and related others by exploring similar questions and additional content below.
Similar questions
  • SEE MORE QUESTIONS
Recommended textbooks for you
Database System Concepts
Database System Concepts
Computer Science
ISBN:
9780078022159
Author:
Abraham Silberschatz Professor, Henry F. Korth, S. Sudarshan
Publisher:
McGraw-Hill Education
Starting Out with Python (4th Edition)
Starting Out with Python (4th Edition)
Computer Science
ISBN:
9780134444321
Author:
Tony Gaddis
Publisher:
PEARSON
Digital Fundamentals (11th Edition)
Digital Fundamentals (11th Edition)
Computer Science
ISBN:
9780132737968
Author:
Thomas L. Floyd
Publisher:
PEARSON
C How to Program (8th Edition)
C How to Program (8th Edition)
Computer Science
ISBN:
9780133976892
Author:
Paul J. Deitel, Harvey Deitel
Publisher:
PEARSON
Database Systems: Design, Implementation, & Manag…
Database Systems: Design, Implementation, & Manag…
Computer Science
ISBN:
9781337627900
Author:
Carlos Coronel, Steven Morris
Publisher:
Cengage Learning
Programmable Logic Controllers
Programmable Logic Controllers
Computer Science
ISBN:
9780073373843
Author:
Frank D. Petruzella
Publisher:
McGraw-Hill Education