10 lines
264 B
Bash
Executable File
10 lines
264 B
Bash
Executable File
#!/bin/bash
|
||
#Program:
|
||
# 计算pi的值,输入要精确到小数多少位
|
||
#History:
|
||
# 2024/07/12 LouisFonda<yigencong@yahoo.com> first release
|
||
|
||
echo -e "**计算pi\n**"
|
||
read -p "请输入你要保留几位小数?:" scale
|
||
echo "scale=${scale};4*a(1)" | bc -lq
|