标签:space pac pause str title man put etc include
输入数据一个字符串,包括字母,数字等。
输出首先出现三次的那个英文字符
Have you ever gone shopping and
e
程序来自网上,侵权即删。
#include <iostream>
#include <stdio.h>
#include <math.h>
#include <iomanip> //不能写成#include <iomanip.h>
#include <string.h>
using namespace std;
/* run this program using the console pauser or add your own getch, system("pause") or input loop */
#include<stdio.h>
#include<string.h>
int main()
{
char c;
int a[300]={0};
while((c=getchar()) != EOF)
{
if((c >= ‘a‘ && c <= ‘z‘) || (c >= ‘A‘ && c <= ‘Z‘))
{
a[c]++;
if(a[c] == 3)
{
printf("%c",c);
break;
}
}
}
return 0;
}
标签:space pac pause str title man put etc include
原文地址:http://www.cnblogs.com/panlangen/p/7764289.html