Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstring>
- using namespace std;
- #define SIZE 20
- char words[SIZE][SIZE];
- int n, k;
- int main() {
- cin >> n;
- for (int i = 0; i < n; i++) {
- cin >> words[i];
- }
- cin >> k;
- for (int i = 0; i < n; i++) {
- if (strlen(words[i]) == k) {
- cout << words[i] << ' ';
- }
- }
- for (int i = 0; i < n; i++) {
- if (strlen(words[i]) != k) {
- cout << words[i] << ' ';
- }
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement