当前位置:网站首页>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}"
边栏推荐
- Entity层、DAO层、Service层、Controller层 先后顺序
- VS扩展工具笔记
- 【7.4】25. K 个一组翻转链表
- leetcode-520. Detect capital letters -js
- Ros2 topic (03): the difference between ros1 and ros2 [01]
- HDU 4747 mex "recommended collection"
- Vs extension tool notes
- Solution: prompt "unsupported video format" when inserting avi format video into the message
- USB (XVII) 2022-04-15
- 包装行业智能供应链S2B2B商城解决方案:开辟电商消费新生态
猜你喜欢
![Given an array, such as [7864, 284, 347, 7732, 8498], now you need to splice the numbers in the array to return the](/img/21/2e99dd6173ab4925ec22290cd4a357.png)
Given an array, such as [7864, 284, 347, 7732, 8498], now you need to splice the numbers in the array to return the "largest possible number."

Live server usage

进度播报|广州地铁七号线全线29台盾构机全部完成始发

Add data analysis tools in Excel

经纬度PLT文件格式说明

UE4_ Ue5 combined with Logitech handle (F710) use record

云原生正在吞噬一切,开发者该如何应对?

Senior programmers must know and master. This article explains in detail the principle of MySQL master-slave synchronization, and recommends collecting

One week learning summary of STL Standard Template Library

Markdown
随机推荐
统计电影票房排名前10的电影并存入还有一个文件
js 获取对象的key和value
B_QuRT_User_Guide(38)
Windows set redis to start automatically
How to generate unique file names
The 19th Zhejiang Provincial College Programming Contest VP record + supplementary questions
Live-Server使用
Tree background data storage (using webmethod) [easy to understand]
【7.4】25. K 个一组翻转链表
Count the top 10 films at the box office and save them in another file
How to login and enable synchronization function in Google browser
HDU 4747 Mex「建议收藏」
【7.5】15. 三数之和
LM12丨Rolling Heikin Ashi二重K线滤波器
Map operation execution process
The 19th Zhejiang Provincial College Programming Contest 2022 f.easyfix chairman tree
B_ QuRT_ User_ Guide(40)
Three questions TDM
Description of longitude and latitude PLT file format
Live server usage