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();
- cout << b[0] << o - 2 << b[o - 1];
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement