Description
找出一个英文字符串中第一个最长的英文单词,字符串中的各英文单词以一个或多个空格分隔或标点符号分隔。如“I am a student.”最长英文单词为”student”。
Input
输入一串字符串。(字符个数不超过500,含标点符号和英文字母,最长英文单词的字符数不超过20)
Output
最长单词,占一行;
Sample Input
I am lucky.student went to school.
Sample Output
student
Source
#include <iostream...
#include<iostream>#include<iomanip>#include<stdlib.h>#include<conio.h>using namespace std;void print(){ cout<<" SUN MON TUR WED THU FRI SAT";}inline void print_day(int day){ cout<<setw(5)<<day;}inline void print_space(){ cout<<" ";}int main() { system("color 9a"); ...