当前位置:网站首页>{1,2,3,2,5} duplicate checking problem
{1,2,3,2,5} duplicate checking problem
2022-07-06 14:42:00 【No two or three things】
#include<stdio.h>
main(){
int a[5]={1,2,3,5,1};
int i,j,flag=0;
for(i=0;i<5;i++){
for(j=i+1;j<5;j++){
if(a[i]==a[j]){
flag = 1;
printf("%d",a[i]);
break;
}
}
if(flag==1)break;
}
return 0;
}
边栏推荐
- Always of SystemVerilog usage_ comb 、always_ iff
- JDBC看这篇就够了
- Binary search tree concept
- JDBC事务、批处理以及连接池(超详细)
- 使用 flask_whooshalchemyplus jieba实现flask的全局搜索
- Sword finger offer 23 - print binary tree from top to bottom
- JDBC read this article is enough
- “人生若只如初见”——RISC-V
- Wu Enda's latest interview! Data centric reasons
- Hcip -- MPLS experiment
猜你喜欢
随机推荐
关于交换a和b的值的四种方法
Keil5-MDK的格式化代码工具及添加快捷方式
Query method of database multi table link
《统计学》第八版贾俊平第十章方差分析知识点总结及课后习题答案
[pointer] counts the number of times one string appears in another string
[pointer] solve the last person left
On the idea of vulnerability discovery
《统计学》第八版贾俊平第七章知识点总结及课后习题答案
MySQL learning notes (stage 1)
指针--剔除字符串中的所有数字
[paper reproduction] cyclegan (based on pytorch framework) {unfinished}
函数:求方程的根
JDBC事务、批处理以及连接池(超详细)
[pointer] find the largest string
【指针】删除字符串s中的所有空格
函数:计算字符串中大写字母的个数
浙大版《C语言程序设计实验与习题指导(第3版)》题目集
Internet Management (Information Collection)
Bing Dwen Dwen official NFT blind box will be sold for about 626 yuan each; JD home programmer was sentenced for deleting the library and running away; Laravel 9 officially released | Sifu weekly
Fundamentals of digital circuit (V) arithmetic operation circuit