随笔分类 - 数论
摘要:C语言使用标志位实现#include using namespace std;#define MaxN 10char used[MaxN];int p[MaxN];char s[MaxN];//从n个元素中选r个进行排列void permute(int pos,const int n,const i...
阅读全文
摘要:#include #include #include#includeusing namespace std;long toTen(char a[],int bit){ long i,b=1,sum=0; int length=strlen(a); for (i=length-1;i...
阅读全文
摘要:头文件:itoa --功能:将任意类型的数字转换为字符串。在中与之有相反功能的函数是atoi。atoi----功 能: 将字符串转换成整型数;atoi()会扫描参数nptr字符串,跳过前面的空格字符,直到遇上数字或正负号才开始做转换,而再遇到非数字或字符串时('\0')才结束转化,并将结果返回(返回...
阅读全文

浙公网安备 33010602011771号