当前位置:网站首页>求3个字符串(每串不超过20个字符)中的最大者。
求3个字符串(每串不超过20个字符)中的最大者。
2022-04-23 06:38:00 【laocooon】
#include <stdio.h>
#include <string.h>
void main()
{ char s[20],string[3][20];
int i;
for (i=0; i<3 ;i++)
gets(string[i]);//string
if(strcmp(string[0],string[1])>0)//string[0][0]>string[1][0]
strcpy(s,string[0]);
else
strcpy(s,string[1]);
if(strcmp(string[2],s)>0)
strcpy(s,string[2]);
printf("%s",s);//printf(s);
}
版权声明
本文为[laocooon]所创,转载请带上原文链接,感谢
https://laocooon.blog.csdn.net/article/details/124356646
边栏推荐
- CTF attack and defense world brush questions 51-
- Shapley Explanation Networks
- A series of articles, a summary of common vulnerabilities of Web penetration (continuously updated)
- BUUCTF MISC刷題
- How to present your digital portfolio: suggestions from creative recruiters
- Intranet security attack and defense: a practical guide to penetration testing (6): domain controller security
- Research on software security based on NLP (2)
- ABAP ALV显示金额与导出金额不一致
- 一些关于网络安全的好教程或笔记的链接,记录一下
- Mysql database backup and recovery under Linux (full + incremental)
猜你喜欢
随机推荐
KCD_EXCEL_OLE_TO_INT_CONVERT报错SY-subrc = 2
内网渗透系列:内网隧道之icmpsh
Research on system and software security (I)
《内网安全攻防:渗透测试实战指南》读书笔记(七):跨域攻击分析及防御
Ctf-misc learning from start to give up
内网渗透系列:内网隧道之dns2tcp
Zhuang understand's TA notes (VI) < fakeenvreflect & rust, rust effect >
[NLP notes] preliminary study on CRF principle
内网渗透系列:内网隧道之dnscat2
strcat()、strcpy()、strcmp()、strlen()
Construction of middleman environment mitmproxy
【问题解决】VS2019解决编译生成的exe文件打不开的情况
使用 Ingress 实现金丝雀发布
MySQL -- the secret of lock -- how to lock data
爬虫学习笔记,学习爬虫,看本篇就够了
Buuctf misc brush questions
BUUCTF MISC刷题
Simplify exporting to SVG data files and all images in SVG folder
Research on system and software security (4)
Link to some good tutorials or notes about network security and record them







![[极客大挑战 2019]Havefun1](/img/8b/b15bf31771d54db25f24d630e64093.png)
![BUUCTF [极客大挑战 2019]EasySQL1](/img/ad/afca09bc1da003393319af700e90e3.png)
