当前位置:网站首页>Find the largest of 3 strings (no more than 20 characters per string).
Find the largest of 3 strings (no more than 20 characters per string).
2022-04-23 08:09: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://yzsam.com/2022/04/202204230638292735.html
边栏推荐
- Intranet penetration series: icmptunnel of Intranet tunnel (Master James Barlow's)
- PHP high precision computing
- Redis事务实现乐观锁原理
- 在线YAML转XML工具
- Dvwa 靶场练习记录
- LeetCode15. Sum of three
- Redis -- why is the string length of string emstr the upper limit of 44 bytes?
- Positioning and decoration style
- Go语学习笔记 - 结构体 | 从零开始Go语言
- Intranet penetration series: pingtunnel of Intranet tunnel
猜你喜欢
简述存储器的分级策略
Essays (updated from time to time)
Ubuntu安装Mysql并查询平均成绩
【编程实践/嵌入式比赛】嵌入式比赛学习记录(一):TCP服务器和web界面的建立
Cloud computing skills competition -- Part 2 of openstack private cloud environment
yum源仓库本地搭建的两种方法
Principle of sentinel integrating Nacos to update data dynamically
LeetCode 1611. 使整数变为 0 的最少操作次数
[programming practice / embedded competition] learning record of embedded competition (I): establishment of TCP server and web interface
BUUCTF [极客大挑战 2019]EasySQL1
随机推荐
Redis transaction implements optimistic locking principle
云计算赛项--2020年赛题基础部分[任务3]
Manipulator motion planning in 3C assembly
C 输出一种二维数组,特点如下。
Planification du mouvement du manipulateur dans l'assemblage 3c
Implementation of promise all
Cloud computing skills competition -- Part 2 of openstack private cloud environment
数据库之Mysql——概述安装篇
一个没啥L用,但可以装X的IDEA插件
Distributed service governance Nacos
3C装配中的机械臂运动规划
【问题解决】VS2019解决编译生成的exe文件打不开的情况
Ubuntu安装Mysql并查询平均成绩
Buuctf misc brush questions
BUFFCTF文件中的秘密1
Hierarchical output binary tree
[Effective Go 中文翻译] 第一篇
【无标题】
Concours de compétences en informatique en nuage - - première partie de l'environnement cloud privé openstack
[programming practice / embedded competition] learning record of embedded competition (II): picture streaming based on TCP