Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int a,
- o;
- string b;
- int main()
- {
- cin >> a;
- for(int i = 0; i < a; i++)
- {
- cout << endl;
- cin >> b;
- if(b.size() <= a) cout << b;
- else
- {
- o = b.size() - 2;
- cout << b[0] << o << b[a - 1];
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement