hdu2025查找最大元素
2015-07-05 09:14
302 查看
#include<iostream> #include<stdio.h> #include<math.h> #include<stdlib.h> #include<string.h> #include<limits> using namespace std; int main() { char str[120]; while(~scanf("%s",str)) { char max; max='0'; for(int i=0;i<strlen(str);i++) { if(str[i]>max) max=str[i]; } for(int i=0;i<strlen(str);i++) { if(str[i]==max) { printf("%c(max)",str[i]); } else printf("%c",str[i]); } cout<<endl; } return 0; }
相关文章推荐
- Quartz.NET 2.0 学习笔记(1) :Quartz.NET简介
- 面向对象设计的基本原则
- Quartz.NET 2.0 学习笔记(1) :Quartz.NET简介
- android学习笔记(九)——动画效果的实现1tween动画
- 队列的顺序存储
- Topshelf 和 Katana:统一的 Web 和服务体系结构
- Topshelf 和 Katana:统一的 Web 和服务体系结构
- 牛人看外文文献的方法
- 九的余数
- 腾讯、百度、阿里深圳建大厦 三巨头玩地产谁最强?
- 使用Topshelf创建Windows 服务
- 使用Topshelf创建Windows 服务
- 用指定颜色填充一个连接域
- Nine Great Books about Information Visualization
- Windows 10 10159升级到10162版的详细教程
- Managing Packages Using the Package Manager Console
- 回调函数
- Managing Packages Using the Package Manager Console
- hdu2024C语言合法标识符
- NuGet学习笔记(1)——初识NuGet及快速安装使用