
积累
文章平均质量分 54
jessicaflora
这个作者很懒,什么都没留下…
展开
-
Simple Queue
Simple QueueProblem Implement a queue. Input some number means action.(End with EOF) 1 means push into the queue. Promise that another integer will follow it, meaning the value to push. If the原创 2017-11-30 15:48:32 · 464 阅读 · 0 评论 -
递归方法の汉诺塔问题
#include<stdio.h>void move(int n, char a, char b, char c) { if (n == 1) printf("%c%c\n", a, c); else { move(n - 1, a, c, b); printf("%c%c\n", a, c); move(n原创 2017-12-04 00:21:56 · 205 阅读 · 0 评论 -
三角·蛇形矩阵
#include<stdio.h> #define N 100 int main() { int a[N][N] = { 0 }; int t, j, k, l, m, n, i; scanf("%d", &t); l = t; for (j = 0; j<t; j++) { m = j + 1; n = j;原创 2017-12-04 00:58:16 · 590 阅读 · 0 评论 -
打印魔方阵
奇数版#include "stdio.h" #define N 15 void main() { int n,i,j,a,b,num,u,v; int c[15][15]; scanf("%d",&n); while(n%2==0) { scanf("%d",&n); } num=n*n; for(i=0;i<n;i++) for(j=0;j<n;j++) c[i]原创 2017-12-21 21:01:00 · 638 阅读 · 0 评论