Note: Could you plz go through this code and let me
know if u need any changes in this.Thank You
=================================
#include <iostream>
#include <iomanip>
using namespace std;
void title();
int DataIn(int nos[]);
void Threshold(int nos[], int cnt);
int main()
{
//Declaring variables
const int SIZE = 100;
int nos[SIZE], cnt = 0;
title();
cnt = DataIn(nos);
Threshold(nos, cnt);
return 0;
}
void title()
{
cout << "This program inputs a list of numbers and then
displays" << endl;
cout << "those integers above or equal to and below a nominal
number." << endl;
cout << "Use a negative number to stop entering data."
<< endl;
cout << endl;
}
int DataIn(int nos[])
{
int num, cnt = 0;
cout << "Input the first number :";
cin >> num;
while (num > 0) {
nos[cnt] = num;
cnt++;
cout << "Input another number :";
cin >> num;
}
cout << endl;
return cnt;
}
void Threshold(int nos[], int cnt)
{
int nominalLevel;
cout << "What is the nominal level? ";
cin >> nominalLevel;
cout << "Above" << endl;
cout << "-----" << endl;
for (int i = 0; i < cnt; i++) {
if (nos[i] >= nominalLevel) {
cout << nos[i] << endl;
}
}
cout << "\nBelow" << endl;
cout << "-----" << endl;
for (int i = 0; i < cnt; i++) {
if (nos[i] < nominalLevel) {
cout << nos[i] << endl;
}
}
}
==================================
Output:

=====================Could you plz rate me
well.Thank You
You will develop a program that will read a list of integers into an array. Data...
Consider the following program that reads a number of nonnegative integers into an array and prints the contents of the array. Complete the missing parts, add new function prototypes and function definitions, and test the program several times. Add the following to the program: Write a void function that prints the list of nonnegative integers in reverse. Write a void function that prints all the numbers stored in the list that are greater than 10. It will also print the...
Write a recursive function in C++ that displays all nodes data (integers) in an array of linked lists. Assuming: struct node { int data; node * next; }; class arrayList { public: arrayList(); ~arrayList(); private: node ** head; int size; //(this is determined by another part of the program) }
How can I modify my program to accept a list of integers (up to 20 entries) from the user into a list and prints the numbers entered by the user in ascending order, their sum and their average. The program then stops when the user inputs -100 as a number to search. #function that returns largest number def max(numOne,numTwo,numThree): if(numOne > numTwo and numOne > numThree): return numOne elif(numTwo > numOne and numTwo > numThree): return numTwo elif(numThree > numOne...
C++ assignment Write a program that reads a sequence of integers and prints the following: 1. The number of odd and even numbers of inputs Use a sentinel value to signal the end of inputs. If the sentinel value is the first you enter, give a message “NO input is entered!”. Input Validation: Do not accept a negative number.
LAB: How many negative numbers Write a program that generates a list of integers, and outputs those integers, and then prints the number of negative elements. Create a method (static void fillArray(int [] array)) that uses Random to generate 50 values (Random.nextInt()), put each value in the array (make sure to pass the array in to this method as an argument). Write another method (static int printAndCountNeg(int [] array)) that prints each element’s value and count the number of negative...
Please Help! Write a C++ program to read integers until 9999 is entered (called sentinel – sentinel is used to indicate the end of input and must not to be considered as the valid data for the computation). Perform the following operations for the integers entered by the user. Display the sum of the numbers less than 100 Display the smallest of the positive integers Display the largest of the negative integers Display how many integers are between 100 and...
Write a program that uses an int one-dimensional array list to
input 10 integers representing amounts of money. Find the highest
(maximum) amount and the lowest (minimum) amount. Output all the
amounts and their difference to the highest amount side by side as
shown in the sample output.
c++
Chapter #8 (Arrays) and 6 (Value Returning and void Functions) Exercise #1: One-dimensional array manipulation Write a program that uses an int one-dimensional array list to input 10 integers representing amounts...
I need help programming this question using C language. This program uses input data entered in command line at the same time when the command or .exe file is entered. They are called command-line arguments. Because everything entered in command line is taken as a string, these arguments including the command itself or the .exe file name are stored in an array of char pointers, each pointer points to the first character of a string (i.e., argument). The inputs can...
Write a program in MIPS assembly language that implements the DESCENDING bubble sort algorithm to sort a variable-sized array of signed 32-bit integers (words)that are read from the console. Be reminded that in a descending sort, the integers are sorted from the largest to the smallest. A “special value” 99999 will beused to signify the end of the input sequence. This value is not to be considered part of the input data set. However, any value greater than 99999 that...
Write a C Program that inputs an array of integers from the user along-with the length of array. The program then prints out the array of integers in reverse. (You do not need to change (re-assign) the elements in the array, only print the array in reverse.) The program uses a function call with array passed as call by reference. Part of the Program has been given here. You need to complete the Program by writing the function. #include<stdio.h> void...