10 lines
264 B
Bash
Executable File
Raw Permalink Blame History

This file contains ambiguous Unicode characters

This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.

#!/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