Untitled
Never
#include <iostream> #include <string> using namespace std; int main() { int length; cout << "how many numbers in the file?" << endl; cin >> length; // defines variables int a[length]; for (int i = 0; i < length; i++) InFile >> a[i]; int temp; int middle; for (int i = 0; i < 5; i++) { cin >> a[i]; } // sorts the array with bubble sort for (int j = 0; j < 6; j++) { for (int k = j + 1; k < 7; k++) if (a[j] > a[k]) { temp = a[k]; a[k] = a[j]; a[j] = temp; } } cout << "the elements after sorting" << endl; middle = length / 2; cout << a[middle] << "is the midian" << endl; // prints median to the screen system("pause"); return 0; }
Raw Text
-
Untitled
3 min ago
-
Untitled
8 min ago
-
Untitled
11 min ago
-
Sharing A Hotel With My Best Friend's Girlfriend
23 min ago
-
rtryrtt fdsgfhj
26 min ago
-
L.i.t.t.l.e girls
52 min ago
-
Greedily sucks dick in public in the car of a guy he sees for the first time
53 min ago
-
Rap3
53 min ago
-
inc3st
53 min ago
-
The stepmother steals boyfirends. Sol Peterson
1 hour ago