mhjerry 的 站内主页

关于排列的问题
HOT

   最近在网上有很多的排列的程序,很多种方法,但都觉看不懂,所以自己写了一个自己能看懂的,思路很简单,就是俩俩交换,速度还行。// test_67.cpp : Defines the entry point for the console application.//#include "stdafx.h"#include<stdio.h>#define N 20i...
阅读全文

++操作
HOT

++操作容易C:\135\1.cpp(194) : error C2105: '++' needs l-value的报错!#include <stdio.h>void main(){  char a={'A','B','C','D','E'},*p=a,i;  for(i=0;i<5;i++)  printf("%c",*a++);}为什么编译不成功...
阅读全文

函数递归调用
HOT

书上习题10.4有n个整数,使前面各数顺序向后移m个位置,最后m个数变成最前面m个数。写一函数实现以上功能,主函数中输入n个整数和输出调整后的n个数。#include <stdio.h>void move(int *p,int n,int m);void main(){  int n,m,i;  int num;  printf("how many num...
阅读全文

生日祝福
HOT

有趣的利用转义字符,祝贺别人生日快乐。#include <stdio.h>void your(); void birthday_message(); void main() { your(); birthday_message(); your(); } void your() { printf("\52 * \52 \x2A \52 * \52 * \52 \x2A \52 \n");...
阅读全文