-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathtest.c
More file actions
48 lines (46 loc) · 717 Bytes
/
test.c
File metadata and controls
48 lines (46 loc) · 717 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
#include <stdio.h>
#include <string.h>
void DelStr(char s[])
{
int i = 0, n, j, k;
k = strlen(s);
char a[k];
for (i; i < k; i++)
{
a[i] = 0;
}
i = 0;
for (; i < k; i++)
{
if (((int)s[i] > 64 && (int)s[i] < 91) || ((int)s[i] > 96 && (int)s[i] < 123))
{
n = i;
break;
}
}
j = n;
for (i = 0; i < n; i++)
{
a[i] = s[i];
}
for (i = n; i < k; i++)
{
if (s[i] == '*')
{
continue;
}
else
{
a[j] = s[i];
j++;
}
}
puts(a);
}
int main()
{
char s[100];
scanf("%s", s);
DelStr(s);
return 0;
}