当前位置:网站首页>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}"
边栏推荐
猜你喜欢

LDO穩壓芯片-內部框圖及選型參數

建筑建材行业SRM供应商云协同管理平台解决方案,实现业务应用可扩展可配置
![Ros2 topic (03): the difference between ros1 and ros2 [01]](/img/20/39d47c93400050a7bc8ad7efea51b3.png)
Ros2 topic (03): the difference between ros1 and ros2 [01]

UE4_ Ue5 combined with Logitech handle (F710) use record

One week learning summary of STL Standard Template Library

产业共融新势能,城链科技数字峰会厦门站成功举办

移动端异构运算技术 - GPU OpenCL 编程(基础篇)

深入理解Mysql锁与事务隔离级别

List. How to achieve ascending and descending sort() 2020.8.6

2021icpc Shanghai h.life is a game Kruskal reconstruction tree
随机推荐
Spark 离线开发框架设计与实现
Add data analysis tools in Excel
B_ QuRT_ User_ Guide(38)
Puce à tension stabilisée LDO - schéma de bloc interne et paramètres de sélection du modèle
B_QuRT_User_Guide(40)
Home appliance industry channel business collaboration system solution: help home appliance enterprises quickly realize the Internet of channels
HDU 4747 Mex「建议收藏」
PCI-Express接口的PCB布线规则
B_QuRT_User_Guide(36)
Caip2021 preliminary VP
Ros2 topic (03): the difference between ros1 and ros2 [01]
ROS2专题(03):ROS1和ROS2的区别【01】
Map operation execution process
FPGA basics catalog
B / Qurt Utilisateur Guide (36)
USB (XVIII) 2022-04-17
re1攻防世界逆向
CAIP2021 初赛VP
LeeCode -- 6. Z 字形变换
turbo intruder常用脚本