随笔分类 - Linux
摘要:1.C++整数类型范围可以参照头文件limits.h定义的宏#defineINT_MAX2147483647(32bit,最大10位十进制)#defineUINT_MAX4294967295U(32bit,最大10位十进制)#defineLLONG_MAX9223372036854775807LL(...
阅读全文
摘要:1.bc计算平方和2的n次方#!/bin/bashsquare(){echo "square of $1 is \c"echo "$1*$1"|bc}########################cube(){echo "cube of $1 is \c"echo "2^$1"|bc}#######################power(){echo "raising 2 to the power of $1 is \c"}while getopts s:c:p: optiondocase
阅读全文