华为机考--悲剧的开始

#include 
#include 
#include 
using namespace std;

#define NUM 1025

int pb(char *str)
{
	if (*str>='a' &&*str<='z')
	{
		return 1;
	}
	else if (*str>='A' &&*str<='Z')
	{
		return 1;
	}
	else if (*str==','|| *str=='.'||*str=='?'||*str=='!'||*str==' ')
	{
		return 2;
	}
	else
		return 0;
	
}

void reverse(char *str,int len)
{
	char result[NUM];
	char chtmp[NUM];
	int count=0;
	int count1=0;
	int i;
	for (i=0;i
#include 
#include 
using namespace std;

#define NUM 1025

void Bubblesort(int *str,int len)
{
	int tmp;
	//int len=sizeof(str);
	int i,j;
	for (i=0;istr[j+1])
			{
				tmp=str[j];
				str[j]=str[j+1];
				str[j+1]=tmp;

			}
		}
	}




}



int main(void)
{
	char ch[NUM]={0};
	int istr[NUM]={0};
	int number=0;
	cin>>ch;
	//cout<0)
	{
		istr[COUNT++]=number;
	}
	Bubblesort(istr,COUNT);
	for (i=0;i

#include #include #include using namespace std;#define NUM 1025void Bubblesort(int *str,int len){int tmp;//int len=sizeof(str);int i,j;for (i=0;istr[j+1]){tmp=str[j];str[j]=str[j+1];str[j+1]=tmp;}}}}int main(void){char ch[NUM]={0};int istr[NUM]={0};int number=0;cin>>ch;//cout<0){istr[COUNT++]=number;}Bubblesort(istr,COUNT);for (i=0;i
 

你可能感兴趣的:(面试)