当前位置:网站首页>The for loop realizes 1-100 addition and eliminates the 4-digit tail number
The for loop realizes 1-100 addition and eliminates the 4-digit tail number
2022-07-07 23:33:00 【Bobo in summer】
#!/bin/bash
i_End=4
i_Total=0
for((i=1;i<=100;i++))
do
i_temp=`expr $i % 10`
if [ $i_temp -eq $i_End ];
then
echo " skip :${i}"
continue;
fi
i_Total=$((${
i_Total}+i))
done
echo "Total=${i_Total}"
边栏推荐
- How to login and enable synchronization function in Google browser
- USB (XVII) 2022-04-15
- 深入理解Mysql锁与事务隔离级别
- In the field of software engineering, we have been doing scientific research for ten years!
- Conversion between commonsmultipartfile and file
- Entity层、DAO层、Service层、Controller层 先后顺序
- Explain
- Unity3d learning notes 4 - create mesh advanced interface
- System design overview
- SAP 内存参数调优过程
猜你喜欢
Senior programmers must know and master. This article explains in detail the principle of MySQL master-slave synchronization, and recommends collecting
js 获取对象的key和value
Digital procurement management system for fresh food industry: help fresh food enterprises solve procurement problems and implement online procurement throughout the process
Ros2 topic (03): the difference between ros1 and ros2 [02]
UE4_ Ue5 combined with Logitech handle (F710) use record
LDO稳压芯片-内部框图及选型参数
Unity3d learning notes 5 - create sub mesh
LeeCode -- 6. Z 字形变换
2022 certified surveyors are still at a loss when preparing for the exam? Teach you how to take the exam hand in hand?
PCI-Express接口的PCB布线规则
随机推荐
【7.5】15. 三数之和
StringUtils工具类
windows设置redis开启自动启动
How can we make money by making video clips from our media?
B_QuRT_User_Guide(36)
Summary of SQL single table query 2020.7.27
PCI-Express接口的PCB布线规则
UE4_ Ue5 panoramic camera
V-for traversal object
SQL database execution problems
Cloud native is devouring everything. How should developers deal with it?
2022注册测绘师备考开始 还在不知所措?手把手教你怎么考?
Design and implementation of spark offline development framework
Happy gathering time
[untitled]
PCB wiring rules of PCI Express interface
Summary of common methods of object class (September 14, 2020)
re1攻防世界逆向
SAP HR 劳动合同信息 0016
给出一个数组,如 [7864, 284, 347, 7732, 8498],现在需要将数组中的数字拼接起来,返回「最大的可能拼出的数字」