Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

L0 有些重复 #44

Open
wants to merge 39 commits into
base: master
Choose a base branch
from
Open
Show file tree
Hide file tree
Changes from 5 commits
Commits
Show all changes
39 commits
Select commit Hold shift + click to select a range
1461d81
Add files via upload
jinshayumi Feb 27, 2017
6e01ae9
Create L0,L1PART
jinshayumi Mar 1, 2017
70de778
hanoi
jinshayumi Mar 15, 2017
5bb6bc3
hanoi
jinshayumi Mar 15, 2017
ae78780
new level 1
jinshayumi Mar 27, 2017
bf52a24
changes
jinshayumi Mar 28, 2017
519c20b
Delete 1万你好.c
jinshayumi Mar 28, 2017
6d854d5
Delete 2到100偶数.c
jinshayumi Mar 28, 2017
4e60002
Delete 3个数.c
jinshayumi Mar 28, 2017
f430b3b
Delete 3整除5不整除.c
jinshayumi Mar 28, 2017
6fbf106
Delete 5个数.c
jinshayumi Mar 28, 2017
cc3cbb6
Delete 5个比大小.c
jinshayumi Mar 28, 2017
357654f
Delete 99.c
jinshayumi Mar 28, 2017
572c795
Delete JCC.c
jinshayumi Mar 28, 2017
5eb085c
Delete L0,L1PART
jinshayumi Mar 28, 2017
4ad7c70
Delete hello.c
jinshayumi Mar 28, 2017
43597b7
Delete n个大小.c
jinshayumi Mar 28, 2017
c3bad89
Delete n个数.c
jinshayumi Mar 28, 2017
fcd606b
Delete zj.c
jinshayumi Mar 28, 2017
dd81311
Delete 奇偶 13.c
jinshayumi Mar 28, 2017
8ce52ed
Delete 跟7有关.c
jinshayumi Mar 28, 2017
3851542
Delete 闰年.c
jinshayumi Mar 28, 2017
9b4a5b8
new level 0
jinshayumi Mar 28, 2017
4848cc1
maze
jinshayumi Apr 5, 2017
866acb7
fighter main
jinshayumi May 22, 2017
4009b32
Create fighter music
jinshayumi May 22, 2017
b96672c
Create fighter bullet
jinshayumi May 22, 2017
cb0845c
canvas
jinshayumi Jun 23, 2017
416439b
circuit
jinshayumi Jun 23, 2017
5d8eee0
point and circle
jinshayumi Jun 23, 2017
b787db5
queue
jinshayumi Jun 23, 2017
3aacdd1
Update fighter main
jinshayumi Jun 23, 2017
b828a32
bigboss
jinshayumi Jun 23, 2017
4528cdd
Create bigbullet
jinshayumi Jun 23, 2017
01cb96f
Create enemy
jinshayumi Jun 23, 2017
e972cca
Create gift
jinshayumi Jun 23, 2017
b47f338
Create smallboss
jinshayumi Jun 23, 2017
b785668
Create smallbullet
jinshayumi Jun 23, 2017
dda98ab
Create super skill
jinshayumi Jun 23, 2017
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions hanoi
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#include<stdio.h>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

后缀名不对

void move(int n,int x,int y,int z)
{
if(n==1)
{
move(n-1,x,z,y);
printf("%c->%c\n",x,z);
move(n-1,y,x,z);
}
}
void main()
{
int h;
printf("\ninputnumber:\n");
scanf("%d",&h);
printf("the step to moving %2d diskes:\n",h);
move(h,'a','b','c');
}
7 changes: 7 additions & 0 deletions practices/c/level0/1万你好.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#include<stdio.h>
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

不要用中文文件名

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

文件名不能用中文

main()
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

main函数需要有返回类型

{
int i;
for(i=1;i<=10000;i++)
printf("hello ");
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

缩进+大括号

}
7 changes: 7 additions & 0 deletions practices/c/level0/2到100偶数.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,7 @@
#include<stdio.h>
main()
{
int a;
for(a=2;a<=100;a=a+2)
printf("%d ",a);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

缩进,加大括号

}
21 changes: 21 additions & 0 deletions practices/c/level0/3个数.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
#include <stdio.h>
void main()
{
int a,b,c;
printf("������������");
scanf("%d %d %d",&a,&b,&c);
if(a>b)
{
if(a>c)
printf("����Ϊ%d",a);
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

同上

else
printf("����Ϊ%d",c);
}
else
{
if(b<c)
printf("����Ϊ%d",c);
else
printf("����Ϊ%d",b);
}
}
10 changes: 10 additions & 0 deletions practices/c/level0/3整除5不整除.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
#include<stdio.h>
main()
{
int a;
for(a=1;a<=100;a++)
{
if(a%3==0&&a%5!=0)
printf("%d\n",a);
}
}
16 changes: 16 additions & 0 deletions practices/c/level0/5个数.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
#include<stdio.h>
main()
{
int a[5];
printf("����5����");
int i,b;
for(i=1;i<=5;i++)
{
scanf("%d",&a[i]);
}
printf("û�г��ֵ���Ϊ");
for(b=0;b<=9;b++)
if(b!=a[1]&&b!=a[2]&&b!=a[3]&&b!=a[4]&&b!=a[5])
printf("%d",a[i]);

}
23 changes: 23 additions & 0 deletions practices/c/level0/5个比大小.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
#include<stdio.h>
void main()
{
int a,b,k;
const n=5;
int i[n];
printf("������5��0-9������\n");
for(a=1;a<=n;a++)
{
printf("i[%d]=",a);
scanf("%d",&i[a]);
}
for(a=1;a<n;a++)
for(b=1;b<=n-a;b++)
if(i[b]>i[b+1])
{
k=i[b];
i[b]=i[b+1];
i[b+1]=k;
}
for(a=1;a<=n;a++)
printf("%d\n",i[a]);
}
22 changes: 22 additions & 0 deletions practices/c/level0/99.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
#include<stdio.h>
int main()
{
int a,b,c;
printf(" *");
for(a=1;a<=9;a++)
{
printf("%4d",a);
}
printf("\n");
for(a=1;a<=9;a++)
{
printf("%4d",a);
for(b=1;b<=a;b++)
{
c=a*b;
printf("%4d",c);
}
printf("\n");
}

}
17 changes: 17 additions & 0 deletions practices/c/level0/JCC.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
#include<stdio.h>
int jc(int a)
{
int b=1,i;
for(i=1;i<=a;i++)
b*=i;
return b;
}
void main()
{
int x,y;
printf("����������");
scanf("%d",&x);
y=jc(x);
printf("jc=%d",y);
}

204 changes: 204 additions & 0 deletions practices/c/level0/L0,L1PART
Original file line number Diff line number Diff line change
@@ -0,0 +1,204 @@
#include<stdio.h>
main()
{
int i;
for(i=1;i<=10000;i++)
printf("hello ");
}



#include<stdio.h>
main()
{
int a;
for(a=2;a<=100;a=a+2)
printf("%d ",a);
}



#include <stdio.h>
void main()
{
int a,b,c;
printf("输入三个数:");
scanf("%d %d %d",&a,&b,&c);
if(a>b)
{
if(a>c)
printf("最大的为%d",a);
else
printf("最大的为%d",c);
}
else
{
if(b<c)
printf("最大的为%d",c);
else
printf("最大的为%d",b);
}
}


#include<stdio.h>
main()
{
int a;
for(a=1;a<=100;a++)
{
if(a%3==0&&a%5!=0)
printf("%d\n",a);
}
}


#include<stdio.h>
void main()
{
int a,b,k;
const n=5;
int i[n];
printf("请输入5个0-9的数:\n");
for(a=1;a<=n;a++)
{
printf("i[%d]=",a);
scanf("%d",&i[a]);
}
for(a=1;a<n;a++)
for(b=1;b<=n-a;b++)
if(i[b]>i[b+1])
{
k=i[b];
i[b]=i[b+1];
i[b+1]=k;
}
for(a=1;a<=n;a++)
printf("%d\n",i[a]);
}


#include<stdio.h>
int jc(int a)
{
int b=1,i;
for(i=1;i<=a;i++)
b*=i;
return b;
}
void main()
{
int x,y;
printf("输入整数:");
scanf("%d",&x);
y=jc(x);
printf("jc=%d",y);
}


#include<stdio.h>
main()
{
int n;
printf("n的值为:");
scanf("%d",&n);
int i,j,k;
int a[n]={0};
for(i=1;i<=n;i++)
{
printf("a[%d]:",i);
scanf("%d",&a[i]);
}
for(i=1;i<=n-1;i++)
for(j=1;j<n-i;j++)
if(a[j]<a[j+1])
{
k=a[j];
a[j]=a[j+1];
a[j+1]=k;
}
for(i=1;i<=n;i++)
printf("%d\t",a[i]);
printf("\n");
}


#include<stdio.h>
double zj(float a,float b,float c)
{
float d;
if(a<b)
{
d=a;
a=b;
b=d;
if(a<c)
d=a;
a=c;
c=d;
}
else
{
if(a<c)
d=a;
a=c;
c=d;
}
if(a*a==b*b+c*c)
return printf("为直角");
else
return printf("不为直角");

}

void main()
{
float x,y,z,m;
printf("输入三边:\n");
scanf("%f%f%f",&x,&y,&z);
m=zj(x,y,z);
printf("%d",m);
}



#include<stdio.h>
main()
{
int a,b,c,d;
printf(" *");
for(a=1;a<=9;a++)
printf("%3d",a);
printf("\n");
for(a=1;a<=9;a++);
{
printf("%3d",a);
for(b=1;b<=a;b++)
{
c=a*b;
printf("%3d",c);
}
printf("\n");
}

#include<stdio.h>
main()
{
int a;
for(a=1;a<+100;a++)
if(a%7==0||a%10==7)
printf("%d\n",a);
} }


#include <stdio.h>
int main()
{
int a;
printf("输入年份:");
scanf("%d",&a);
if(a%400==0||a%100!=0&&a%4==0)
printf("a为闰年");
else
printf("a不为闰年");
}
5 changes: 5 additions & 0 deletions practices/c/level0/hello.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
#include <stdio.h>
main()
{
printf("hello world,I am Guohu!");
}
25 changes: 25 additions & 0 deletions practices/c/level0/n个大小.c
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
#include<stdio.h>
main()
{
int n;
printf("n��ֵΪ:");
scanf("%d",&n);
int i,j,k;
int a[n]={0};
for(i=1;i<=n;i++)
{
printf("a[%d]:",i);
scanf("%d",&a[i]);
}
for(i=1;i<=n-1;i++)
for(j=1;j<n-i;j++)
if(a[j]<a[j+1])
{
k=a[j];
a[j]=a[j+1];
a[j+1]=k;
}
for(i=1;i<=n;i++)
printf("%d\t",a[i]);
printf("\n");
}
Loading