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.
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.
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
Step by step
Solved in 4 steps with 2 images
this is what you responded with while asking for coral help.
#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.