摘要:
#include #include using namespace std; //求每一位总和 int add(int m) { int sum = 0; int bc = 0; int p, q = m; while (q > 0) { p = q % 10; sum += p; q = q / 10; }... 阅读全文
摘要:
#include #include using namespace std; char a[80]; int sc[80]; int main() { int i, sum = 0; while (scanf("%s", a) == 1)//注意s前无&用这种方法碰到空格tab等就会结束 用getchar/fgetc(stdin) { for (i = 0... 阅读全文
摘要:
#include "stdafx.h" #include #define maxn 20 int a[maxn][maxn]; using namespace std; int main() { int n, x, y, tot = 0; scanf("%d", &n); memset(a, 0, sizeof(a));//数组初始化为0 tot = a[x = ... 阅读全文