003

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
#include <iostream>
#include <cstdio>
#include <cstring>
#include <string>
using namespace std;
string a,t;
int i,j;
int main(){
    a="morning";
    j=1;
    for (int i = 2; i <=7; i++)
        if(a[j]<a[i])
           j=i;
    j=j-1;
    for ( i = 0; i <=j ; i++)
        printf("%c",a[i]);
return 0;    
}
Scroll to Top