C 字符串去特定字符(九度OJ 1049)
来源:互联网 发布:小猪源码下载 编辑:程序博客网 时间:2024/05/22 10:30
题目描述:
输入字符串s和字符c,要求去掉s中所有的c字符,并输出结果。
- 输入:
测试数据有多组,每组输入字符串s和字符c。
- 输出:
对于每组输入,输出去除c字符后的结果。
- 样例输入:
healloa
- 样例输出:
hello
源代码:
#include <stdio.h>#include <string.h>int main(){ char str[100000]; char c; int i,len; while(gets(str)) { scanf("%c",&c); len=strlen(str); for(i=0;i<len;i++) { if(str[i]!=c) printf("%c",str[i]); } printf("\n"); getchar(); } return 0;}
程序截图:
0 0
- C 字符串去特定字符(九度OJ 1049)
- 九度oj 1049 字符串去特定字符
- 九度OJ 1049 字符串去特定字符
- 九度OJ--1049--字符串去特定字符
- 九度 OJ 1049 字符串去特定字符
- 九度OJ—题目1049:字符串去特定字符
- 九度 OJ 1049:字符串去特定字符
- 九度oj:题目1049:字符串去特定字符
- 九度OJ-题目1049 字符串去特定字符
- 九度OJ 1049:字符串去特定字符 (基础题)
- 九度1049:字符串去特定字符
- 九度 题目1049:字符串去特定字符
- 题目 1049 字符串去特定字符 九度Online Judge
- 九度题目1049:字符串去特定字符
- 九度 Online Judge 算法 刷题 题目1049:字符串去特定字符
- 九度考研真题 2009-1哈工 1049:字符串去特定字符
- 字符串去特定字符
- 字符串去特定字符
- bzoj 2038 [2009国家集训队]小Z的袜子(hose)(莫队算法)
- 使用IDEA创建java程序——简单的hello world
- 面向对象程序设计上机练习二(函数模板)
- Annotation对Servlet的支持(JavaWeb)
- POJ-1068-Parencodings
- C 字符串去特定字符(九度OJ 1049)
- 如何用普通电池给单片机供电?
- rman还原归档时报RMAN-20242错误分析和处理
- 从源码出发深入理解 Android Service
- Linux下设置Tomcat自启动
- 简单集成热修复,实现在线修复bug而不是更新APP
- 定制化属于你的Linux镜像
- UVa12563 -Jin Ge Jin Qu hao(DP)
- 面向对象程序设计上机练习三(有默认参数的函数)