Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string>
- using namespace std;
- int main(int argc,char * argv[]) {
- int max;
- string szukane_slowo = {};
- string napis[100] = {};
- for(int i=1;i<=argc;i++){
- napis[i] = napis[i] + argv[i];
- if(max<napis[i].length()){
- max = napis[i].length();
- szukane_slowo = napis[i];
- }else{
- max = max;
- szukane_slowo = szukane_slowo;
- }
- }
- cout<<szukane_slowo;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement