Advertisement
Guest User

Untitled

a guest
Feb 10th, 2022
121
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.54 KB | None | 0 0
  1. #include <iostream>
  2. #include <string>
  3.  
  4.  
  5. using namespace std;
  6.  
  7. int main(int argc,char * argv[]) {
  8.  
  9. int max;
  10. string szukane_slowo = {};
  11. string napis[100] = {};
  12.  
  13. for(int i=1;i<=argc;i++){
  14. napis[i] = napis[i] + argv[i];
  15.  
  16.  
  17. if(max<napis[i].length()){
  18. max = napis[i].length();
  19. szukane_slowo = napis[i];
  20. }else{
  21. max = max;
  22. szukane_slowo = szukane_slowo;
  23. }
  24.  
  25. }
  26. cout<<szukane_slowo;
  27.  
  28. return 0;
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement