打开一个终端,输入bc
1 $ bc
打开bc,bc可以实现简单的数学计算
一般不懂的软件都是先使用-h 或者--help来查询软件使用帮助
$ bc -h usage: bc [options] [file ...] -h --help print this usage and exit -i --interactive force interactive mode -l --mathlib use the predefined math routines -q --quiet don't print initial banner -s --standard non-standard bc constructs are errors -w --warn warn about non-standard bc constructs -v --version print version information and exit
进入bc后输入表达式回车就可以得到计算结果,输入quit退出
$ bc bc 1.07.1 Copyright 1991-1994, 1997, 1998, 2000, 2004, 2006, 2008, 2012-2017 Free Software Foundation, Inc. This is free software with ABSOLUTELY NO WARRANTY. For details type `warranty'. 5+5 10 22+10 32 quit $