摘要:
int a = 0; List<string> aaa = new List<string>(){ "aaa", "bbb" }; aaa.ForEach(s => a += s.Length); //等价于aaa.ForEach(new Action<string>((s) => a += s.L 阅读全文
摘要:
#include <stdio.h> void swap(int *a,int *b){ int temp=*a; *a=*b; *b=temp; } int main() { int n = 10; int m; int numbers[10]; int i; // 读入给定的数字 for (i 阅读全文
摘要:
#include <stdio.h> #include <string.h> int n = 1000000; int mark[1000001]; int main() { int N,M,j;//N和M为指定输出的质数范围 int c; memset(mark, 0, sizeof(mark)) 阅读全文
摘要:
#include <stdio.h> int main() { int n = 15; int mark[16] = { 1, 1, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0, 0 }; int c; int j; for (c = 2; c * c <= n; c 阅读全文