首页| JavaScript| HTML/CSS| Matlab| PHP| Python| Java| C/C++/VC++| C#| ASP| 其他|
购买积分 购买会员 激活码充值

您现在的位置是:虫虫源码 > C/C++/VC++ > The simplest shell calculator

The simplest shell calculator

  • 资源大小:13.09 kB
  • 上传时间:2021-06-30
  • 下载次数:0次
  • 浏览次数:0次
  • 资源积分:1积分
  • 标      签:

资 源 简 介

A simple command line calculator for Unix-like shells. It supports everything C++ does. In fact, it just creates a C++ program, compiles it, runs it, and deletes it. Therefore, this calculator requires C++ to be installed. The command line is: calc [manipulator] "expression" Some examples: ``` calc "3+3/4.0" 3.75 calc "3*cos(23)+0x23" 33.4015 calc "M_PI*2" 6.28319 calc hex "2*4<<10" 2000 R=calc "sqrt(pow(3,1/3.0))" echo $R 1.20094 ``` Some notes: * Put the expression within double quotes "" * To enter floating point numbers, use the form "x.0" (double precission). See the first expression above. * When two parameters are used, the first one is the manipulator for output. Some manipulators: * hex: outputs the result in hexadecimal. * oct: outputs the result in octal. *

文 件 列 表

shell-calc
calc
CHANGELOG
gpl.txt
README
VIP VIP
0.227563s