Advertisement
Pop_Flaviu

19.11.2019-Pb5

Nov 19th, 2019
98
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.35 KB | None | 0 0
  1. # include <iostream>
  2. # include <cstring>
  3. # include <climits>
  4. using namespace std;
  5. int main ()
  6. {
  7. int maxim,i,n,a;
  8. maxim=-1;
  9. char x[100];
  10. cin >>n;
  11. for (i=1;i<=n;i++)
  12. {
  13. cin >>x;
  14. a=strlen(x);
  15. if (a>maxim)
  16. {
  17. maxim=a;
  18. }
  19. }
  20. cout <<maxim;
  21. return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement