1. int partion(int *a, int low, int high) { int value = a[low]; int t; while (low < high) { while( high > low && a[high] >= value) high--; //会跳到8行的while去执行,而不是转到10行去执行if语句 if(high != low) { t = a[low]; a[low] = a[high]; a[high] = t; } whi…
判断是否为回文数 # include <stdio.h> int main(void) { int val; //存放待判断的数字 int m; ; printf("请输入您需要判断的数字: "); scanf("%d", &val); m = val; while (m) { sum = sum * + m%; m /= ; } if (sum == val) printf("Yes!\n"); else printf(&q…
病毒程序示范 /* 龌龊的程序! */ # include <stdio.h> # include <windows.h> # include <malloc.h> #include<cstdlib> int main(void) { int c; int i; int j; Nihao: printf("1:死机\n"); printf("2:机房爆炸\n"); printf("请选择:\n");…