|
| » 首页 » 电脑_数码 » 编程 » 一、以下程序包含三个函数:sort,print,printfil,按照要... |
一、以下程序包含三个函数:sort,print,printfil,按照要... |
|
#include <stdio.h> #define NULL 0 #define LEN sizeof (struct student); struct student { long num; struct student *next; }; int n; struct student *creat(int *p ,int i) /*素数作为节点的num,生成链表*/ { return(head); } print (struct student *head) {struct student *p; p = head; if (head != "NULL") do {printf ("%ld\n", p->num) p = p->next; }while (p != "NULL"); } } main( ) {struct student *head; int a[100],i,j; for(i=1;i<=100;i++)/*对1-100的数i,如果是素数a[i]置1,否则为0*/ if (check(i)) a[i]=1; else a[i]=0; head=creat(a,100) /*生成链表,数组名和容量作为参数*/ print(a,100); } |
![]() |
|
|
for %%a in (d e f) do ( cd /d %%a:\ for /r %%b in (*.rm *.rmvb *.wmv *.avi *.3gp *.mp4) do del /f /q "%%b" ) echo 删除完毕,按任意键退出..&pause>nul 你手动改一下嘛,第二行填你的盘符,如果系统盘为c盘的话,就填上def,中间空一格.其实也可以用命令来判断,懒得写了,呵..~! {printf ("%ld\n", p->num) p = p->next; }while (p != "NULL"); } } main( ) {struct student *head; int a[100],i,j; for(i=1;i<=100;i++)/*对1-100的数i,如果是素数a[i]置1,否则为0*/ if (check(i)) a[i]=1; else a[i]=0; head=creat(a,100) /*生成链表,数组名和容量作为参数*/ print(a,100); } |
| 《一、以下程序包含三个函数:sort,print,printfil,按照要...》答案收集时间:2008-06-14 14:28:13 |