Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- using namespace std;
- void largerThanN(int [], int);
- void showValue(int [], int);
- // Get numbers from user
- void largerThanN(int numbers[], int size1)
- {
- int index;
- for (index = 0; index < size1; index++)
- {
- cout << "Enter ten numbers: "
- << (index+1) << ": ";
- cin >> numbers[index];
- }
- // display numbers from user input
- cout << "These are the numbers you have entered\n" << endl;
- cout << numbers[index+1] << " ";
- }
- void showValue(int num)
- {
- cout << num << " ";
- }
- int main()
- {
- const int SIZE1 = 10;
- const int SIZE2 = 10;
- int set1[SIZE1];
- int numbers[SIZE2]= { 30, 20, 50, 2, -1, 44, 3, 12, 90, 32 };
- largerThanN(set1, SIZE1);
- // Display original numbers
- cout << "\nThese are the initial values: ";
- for (int index = 0; index < SIZE2; index++)
- showValue(numbers[index]);
- cout << "Thank you for using my program" << endl;
- cout << "Programmer: Holman Duran\nProfessor Najmeh Abezadeh\nCMSC 140\nCRN 32727\nHomework 7\nDue Date: Dec. 7, 2019" << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement