摘要:
代码: #include<stdio.h> #define N 10 int main() { /*输入字符串,str[10],将里面的字符逆反排列,再输出。*/ char ch[N]; int num = 0,i,j,temp; gets(ch);//gets函数会自动在最后补一个\0 for(i 阅读全文
摘要:
1.一个人赶着鸭子去每个村庄卖,每经过一个村子卖去所赶鸭子的一半又一只。这样他经过了七个村子后还剩两只鸭子,问他出发时共赶多少只鸭子?经过每个村子卖出多少只鸭子? 代码: #include<stdio.h> int circ(int); int main() { int all, v, sum; a 阅读全文
摘要:
#include <stdio.h> #include <stdlib.h> /* run this program using the console pauser or add your own getch, system("pause") or input loop */ int main(i 阅读全文
摘要:
#include <stdlib.h> /* run this program using the console pauser or add your own getch, system("pause") or input loop */ int main(int argc, char *argv 阅读全文