#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. xctf一道反序列化题

    题目地址:http://120.24.86.145:8006/test1/ 右键get源码: <?php $user = $_GET["txt"]; $file = $_GE ...

  2. skb管理函数之skb_clone、pskb_copy、skb_copy

    skb_clone--只复制skb描述符本身,如果只修改skb描述符则使用该函数克隆: pskb_copy--复制skb描述符+线性数据区域(包括skb_shared_info),如果需要修改描述符以 ...

  3. BZOJ 4241: 历史研究——莫队 二叉堆

    传送门:http://www.lydsy.com/JudgeOnline/problem.php?id=4241 题意:N个int范围内的数,M次询问一个区间最大的(数字*出现次数)(加权众数),可以 ...

  4. jquery - 实例1

    <%@ Page Language="C#" AutoEventWireup="true" CodeBehind="text2.aspx.cs& ...

  5. JS监控手机或APP返回事件

    做微信项目的时候,发现在Ios微信浏览器左上角有个返回按钮,但是点击返回时不稳定,跳到不该跳的页面.网上搜了一个捕获返回事件的JS代码,记录下来,便于以后查看. <span style=&quo ...

  6. 去掉a标签的虚线框,避免出现奇怪的选中区域

    a{blr:expression(this.onFocus=this.blur())}/*去掉a标签的虚线框,避免出现奇怪的选中区域*/

  7. linux下运行jmeter脚本

    1. win下生成测试计划   2. 上传至linux下 3.运行测试计划   sh jmeter.sh -n -t second_login.jmx -l res.jtl 错误1: solution ...

  8. Python在线教程

    Python 3.x的 http://www.ziqiangxuetang.com/python3/python3-stdlib.html 廖雪峰的官方网站 http://www.liaoxuefen ...

  9. Math.random易于记忆理解

    产生随机数 Math.random*(Max-Min)+Min

  10. poj 1426(同余搜索)

    Find The Multiple Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 26926   Accepted: 111 ...