Problem H: 零起点学算法103——查找最大元素
#include<stdio.h>
#include<string.h>
int main()
{
char a[];
while(gets(a)!=NULL)
{
int k=a[];
for(int i=;a[i]!='\0';i++)
{
if(a[i]>k){
k=a[i];
}
} for(int i=;a[i]!='\0';i++)
{
printf("%c",a[i]);
if(k==a[i])
{
printf("(max)");
}
}
printf("\n");
}
return ;
}
Problem H: 零起点学算法103——查找最大元素的更多相关文章
- Problem H: 零起点学算法109——单数变复数
#include <stdio.h> #include<string.h> int main(void) { int n; ]; scanf("%d",&a ...
- Problem H: 零起点学算法87——打印所有低于平均分的分数
#include<stdio.h> int main(){ ],b[]; while(scanf("%d",&n)!=EOF){ ; ;i<n;i++){ ...
- Problem H: 零起点学算法28——参加程序设计竞赛
#include<stdio.h> int main() { int a,b; while(scanf("%d %d",&a,&b)!=EOF) ||b ...
- 武汉科技大学ACM :1010: 零起点学算法103——一只小蜜蜂...
Problem Description 有一只经过训练的蜜蜂只能爬向右侧相邻的蜂房,不能反向爬行.请编程计算蜜蜂从蜂房a爬到蜂房b的可能路线数. 其中,蜂房的结构如下所示. Input 输入数据的第一 ...
- Problem G: 零起点学算法106——首字母变大写
#include<stdio.h> #include<string.h> int main(void) { ]; int i,k; while(gets(a)!=NULL) { ...
- Problem D: 零起点学算法95——弓型矩阵
#include<stdio.h> #include<string.h> int main() { ][]; while(scanf("%d%d",& ...
- Problem F: 零起点学算法42——多组测试数据输出II
#include<stdio.h> int main() { ; while(scanf("%d%d%d",&a,&b,&c)!=EOF) { ...
- Problem E: 零起点学算法34——3n+1问题
#include<stdio.h> #include<math.h> int main() { int n; n<=pow(,); ; scanf("%d&qu ...
- Problem K: 零起点学算法107——统计元音
#include<stdio.h> int main() { int n; ]; while(scanf("%d%*c",&n)!=EOF) { while(n ...
随机推荐
- centos 引导盘
# grub.conf generated by anaconda## Note that you do not have to rerun grub after making changes to ...
- C json实战引擎 一 , 实现解析部分
引言 以前可能是去年的去年,写了一个 c json 解析引擎用于一个统计实验数据项目开发中. 基本上能用. 去年在网上 看见了好多开源的c json引擎 .对其中一个比较标准的 cJSON 引擎 深入 ...
- 用vue实现登录页面
vue和mui一起完成登录页面(在hbuilder编辑器) <!DOCTYPE html> <html> <head> <meta charset=" ...
- C#调用Excel报 error CS1969: 找不到编译动态表达式所需的一个或多个类型。是否缺少引用?
转自[http://blog.csdn.net/bodybo/article/details/43191319] 程序需要读取Exel文件,有如下代码段 object oMissing = Syste ...
- C语言面试题总结(一)
以前的记录都在电子笔记里,倒不如拿出来,有错的地方和大家交流. 1.指针操作: 如下例,设a内存地址为OX00 int a =10; int *p = &a; *a 编译错误 a表示10 *p ...
- JAVA二叉树的创建以及各种功能的实现
直接上代码了,代码说得很清楚了 package BTree; public class BTree { private Node root; private class Node { private ...
- VS Code js编译支持alias
VS Code 的编译器 其实就是使用的 typescript 编译器,就是以前提到过的 tsserver.js 相应的编译参数可以参考 http://www.typescriptlang.org/d ...
- Child Action
Control [ChildActionOnly] //只能用于Child Action public ActionResult Time() { return PartialView(Da ...
- Ljava/lang/Iterable与AbstractMethodError
java.lang.AbstractMethodError: com.example.demo.repository.UserRepositoryImpl.findAll()Ljava/lang/It ...
- 3.spark streaming Job 架构和容错解析
一.Spark streaming Job 架构 SparkStreaming框架会自动启动Job并每隔BatchDuration时间会自动触发Job的调用. Spark Streaming的Job ...