#include<stdio.h>
#include<string.h>
int main()
{
char ch[],a;
while(gets(ch)!=NULL)
{
scanf("%c",&a);
getchar();
getchar();
for(int i=;ch[i]!='\0';i++)
{
if(ch[i]!=a)
printf("%c",ch[i]);
}
printf("\n");
}
return ;
}
HINT

char str[],a;

while(gets(str)!=NULL)//多组测试数据

{

scanf("%c",&a);

getchar();//注意加这一行,它的作用是将上一行输入的回车符号'\n'符号读入

for(i=;str[i]!='\0';i++) {

//写代码;找到a,用循环语句将数组左移1位置

}

//写代码;输出删除a后的数组

}

return ;

}

//可能第二行的字符后面有空格或者其他的东西,建议用gets来读第二行。

//用C++的可以把gets换成getline会更好

Problem G: 零起点学算法102——删除字符的更多相关文章

  1. Problem G: 零起点学算法106——首字母变大写

    #include<stdio.h> #include<string.h> int main(void) { ]; int i,k; while(gets(a)!=NULL) { ...

  2. Problem G: 零起点学算法86——Fibonacc

    #include<stdio.h> int main(){ ]={,,}; ;i<=;i++) { a[i]=a[i-]+a[i-]; } scanf("%d", ...

  3. Problem G: 零起点学算法27——等级分制度

    #include<stdio.h> int main() { int a,b; while(scanf("%d %d",&a,&b)!=EOF) +a* ...

  4. Problem H: 零起点学算法109——单数变复数

    #include <stdio.h> #include<string.h> int main(void) { int n; ]; scanf("%d",&a ...

  5. Problem D: 零起点学算法95——弓型矩阵

    #include<stdio.h> #include<string.h> int main() { ][]; while(scanf("%d%d",& ...

  6. Problem F: 零起点学算法42——多组测试数据输出II

    #include<stdio.h> int main() { ; while(scanf("%d%d%d",&a,&b,&c)!=EOF) { ...

  7. Problem E: 零起点学算法34——3n+1问题

    #include<stdio.h> #include<math.h> int main() { int n; n<=pow(,); ; scanf("%d&qu ...

  8. Problem K: 零起点学算法107——统计元音

    #include<stdio.h> int main() { int n; ]; while(scanf("%d%*c",&n)!=EOF) { while(n ...

  9. Problem J: 零起点学算法105——C语言合法标识符

    #include<stdio.h> #include<ctype.h>//调用isalpha函数 int main() { int n; ]; while(scanf(&quo ...

随机推荐

  1. js中的indexOf

    1.概述 indexOf大小写敏感,其中的O要大写 2.对于字符串而言 indexOf返回字符串第一次出现的位置,若没有出现返回-1 var str = "hello world" ...

  2. CART算法(转)

    来源:http://www.cnblogs.com/pinard/p/6053344.html 作者:刘建平Pinard 对于C4.5算法,我们也提到了它的不足,比如模型是用较为复杂的熵来度量,使用了 ...

  3. Java多线程学习(三)volatile关键字

    转载请备注地址:https://blog.csdn.net/qq_34337272/article/details/79680693 系列文章传送门: Java多线程学习(一)Java多线程入门 Ja ...

  4. 一个无线通信类投稿的期刊list

    转载一个,但是有些期刊的影响因子不是很对,要投的时候还是再到期刊主页上面看一看吧~ 期刊缩写 期刊全名 近年影响因子 P IEEE Proceedings Of The IEEE 3.686 IEEE ...

  5. mysql连接池优化笔记

    中间件mycat是一个高性能的分表分库读写分离的中间件,但配置不好的情况会出现很多性能问题. 1.mycat-web的监控的准确性有问题,1.6-RELEASE  ,1.0-SNAPSHOT (web ...

  6. sicily 1059. Exocenter of a Trian

    Description Given a triangle ABC, the Extriangles of ABC are constructed as follows: On each side of ...

  7. RadioButton 带下划线切换的案例

    xml <?xml version="1.0" encoding="utf-8"?> <RelativeLayout android:id=& ...

  8. ajax之深入解析(1)

    AJAX = Asynchronous JavaScript and XML(异步的 JavaScript 和 XML).AJAX 是一种在无需重新加载整个网页的情况下,能够更新部分网页的技术. AJ ...

  9. POJ 1733 Parity game(带权并查集)

    题目链接:http://poj.org/problem?id=1733 题目大意:给你m条信息,每条信息告诉你区间l~r的1的个数是奇数还是偶数,如果后面出现信息跟前面矛盾则这条信息是错误的,问在第一 ...

  10. poj 2104(线段树)

    K-th Number Time Limit: 20000MS   Memory Limit: 65536K Total Submissions: 45653   Accepted: 15177 Ca ...