Skip to content
View Qangit's full-sized avatar

Block or report Qangit

Block user

Prevent this user from interacting with your repositories and sending you notifications. Learn more about blocking users.

You must be logged in to block users.

Please don't include any personal information such as legal names or email addresses. Maximum 100 characters, markdown supported. This note will be visible to only you.
Report abuse

Contact GitHub support about this user’s behavior. Learn more about reporting abuse.

Report abuse
Qangit/README.md

#include<stdio.h> #include<string.h> int main() { char str[100];

gets_s(str);
int last = strlen(str);
int frontindex = 0, backindex = last - 1;
for (int i = 0; i < last; i++)
{
	int panduan1 = str[i] >= 'a' && str[i] <= 'z';
	int panduan2 = str[i] >= 'A' && str[i] <= 'Z';
	if ((panduan1 || panduan2 == 1) || str[i] == '*')
	{
		;
	}
	else
	{
		printf("error\n");
		return -1;
	}

}
while (1)
{
	int panduan1 = str[frontindex] >= 'a' && str[frontindex] <= 'z';
	int panduan2 = str[frontindex] >= 'A' && str[frontindex] <= 'Z';
	if (panduan1 || panduan2 == 1)
	{
		break;
	}
	else
	{
		frontindex++;
	}
}
while (1)
{
	int panduan1 = str[backindex] >= 'a' && str[backindex] <= 'z';
	int panduan2 = str[backindex] >= 'A' && str[backindex] <= 'Z';
	if (panduan1 || panduan2 == 1)
	{
		break;
	}
	else
	{
		backindex--;
	}
	if (backindex == 0)
	{
		backindex = last - 1;
		break;
	}
}
for (int i = 0; i < frontindex; i++)
{
	if (str[i] == '*')

		printf("%c",str[i]);

}
for (int i = frontindex; i <= backindex; i++)
{
	int panduan1 = str[i] >= 'a' && str[i] <= 'z';
	int panduan2 = str[i] >= 'A' && str[i] <= 'Z';
	if (str[i] == '*')
	{
		;

	}
	else if (panduan1 || panduan2 == 1)
	{
		printf("%c", str[i]);
	}


}
for (int i = backindex+1; i < last; i++)
{
	if (str[i] == '*')
	{
		printf("%c", str[i]);

	}

}
printf("\n");
return 0;

}

Popular repositories Loading

  1. Qangit Qangit Public

    Config files for my GitHub profile.

  2. - - Public

    Forked from mrcaidev/data-mining-and-big-data-analytics

    电子科技大学 2020 级《数据挖掘与大数据分析》课程代码。

    Java

  3. uestc uestc Public

    subject resource in uestc