Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- //EXERCISE 2
- //main.cpp
- #include <iostream>
- using namespace std;
- void sortArray(char array[]);
- int main(int argc, char** argv)
- {
- int s = 0;
- cout << "insert size please:";
- cin >> s;
- char a[s];
- cout << "put r for colour red, b for colour blue" << endl;
- for(int i = 0; i < s; i++)
- {
- cout << "color " << i + 1 << " is: ";
- cin >> a[i];
- cout << endl;
- }
- sortArray(a);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement