Problem C: 零起点学算法82——数组中查找数
#include<stdio.h>
int main(void)
{
int n,i,a[],m;
while(scanf("%d",&n)!=EOF)
{
for(i=;i<n;i++)
{
scanf("%d",&a[i]);
}
scanf("%d",&m);
for(i=;i<n;i++)
{
if(m==a[i])
{
printf("%d",i);
break;
}
}
if(i==n)
printf("No");
printf("\n");
}
return ;
}
Problem C: 零起点学算法82——数组中查找数的更多相关文章
- Problem F: 零起点学算法85——数组中插入一个数
#include<stdio.h> int main() { ],b[]; while(scanf("%d",&n)!=EOF) { ;i<n;i++) ...
- Problem D: 零起点学算法83——数组中删数
#include<stdio.h> int main(void) { int n,i,t,x,flag; while(scanf("%d",&n)!=EOF) ...
- Problem E: 零起点学算法84——数组中删数II
#include<stdio.h> int main() { ],b[],i,flag=; while(scanf("%d",&n)!=EOF) { ;i< ...
- 1145: 零起点学算法52——数组中删数II
1145: 零起点学算法52--数组中删数II Time Limit: 1 Sec Memory Limit: 64 MB 64bit IO Format: %lldSubmitted: 293 ...
- 1144: 零起点学算法51——数组中删数(C语言)
题目: 题目来源WUSTOJ 源代码: #include<stdio.h> int main() { int n, m, i, a[20]; while (scanf("%d&q ...
- Problem A: 零起点学算法91——找出一个数组中出现次数最多的那个元素
#include<stdio.h> int main() { ],b[]={}; while(scanf("%d",&n)!=EOF) { ;i<n;i+ ...
- Problem B: 零起点学算法81——找出数组中最大元素的位置(下标值
#include<stdio.h> int main(void) { ],i,max; while(scanf("%d",&n)!=EOF) { ;i<n ...
- Problem A: 零起点学算法80——逆序输出(数组练习)
#include<stdio.h> int main() { ]; scanf("%d",&n); ;i<=n;i++){ scanf("%d& ...
- Problem G: 零起点学算法102——删除字符
#include<stdio.h> #include<string.h> int main() { ],a; while(gets(ch)!=NULL) { scanf(&qu ...
随机推荐
- windows+nexus+maven环境搭建(转)
windows nexus环境搭建 1.下载nexus 版本为 nexus-2.11.4-01-bundle 下载地址 这里写链接内容 2.将下载好的文件放到D盘进行解压 3.解压后目录结构 nexu ...
- javascript中数据属性与访问器属性
1.数据属性 Configurable:true|false,表示能否通过delete将属性删除,默认为true.当把属性的Configurable设置为false后,该属性不能通过delete删除, ...
- bootstrap-table组合表头
1.效果图 2.html代码 <table id="table"></table> 3.javascript代码 $("#table") ...
- 2017中国大学生程序设计竞赛 - 网络选拔赛 HDU 6153 A Secret KMP,思维
题目链接:http://acm.hdu.edu.cn/showproblem.php?pid=6153 题意:给了串s和t,要求每个t的后缀在在s中的出现次数,然后每个次数乘上对应长度求和. 解法:关 ...
- Oralce Spatial
1.建立数据库连接 create public database link ytlink connect to hightop identified by hightop using '(DESCRI ...
- Mysql 数据库学习笔记03 存储过程
一.存储过程:如下 通过 out .inout 将结果输出,可以输出多个值. * 调用存储过程: call 存储名称(参数1,参数2,...); 如指定参数不符合要求,返回 Emp ...
- pdf2htmlEX安装和配置
1.下载 安装的依赖: sudo yum install cmake gcc gnu-getopt java-1.8.0-openjdk libpng-devel fontforge-devel ca ...
- HDU-2389
Rain on your Parade Time Limit: 6000/3000 MS (Java/Others) Memory Limit: 655350/165535 K (Java/Ot ...
- Django Rest Framework用户访问频率限制
一. REST framework的请求生命周期 基于rest-framework的请求处理,与常规的url配置不同,通常一个django的url请求对应一个视图函数,在使用rest-framewor ...
- java静态类与非静态类区别
java静态与非静态区别 这里的静态,指以static关键字修饰的,包括类,方法,块,字段. 非静态,指没有用static 修饰的. 静态有一些特点: 1.全局唯一,任何一次的修改都是全局性的影响 ...