Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstring>
- #include <fstream>
- #define N 301
- using namespace std;
- char s[N], pmax[N];
- bool ok;
- void Citire()
- {
- ifstream cin("date.in");
- while(cin>>s)
- {
- if(s[0]>='0'&&s[0]<='9')
- {
- if(ok==0) strcpy(pmax,s);
- else
- if(strcmp(pmax,s)<0)strcpy(pmax,s);
- ok=1;
- }
- }
- if(ok!=0)cout<<pmax;
- else cout<<"nu exista";
- }
- int main()
- {
- Citire();
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement