checkpass()
{int i,j,c,f;
char string[20];
for (i=1;i<=80;i++)
for (j=1;j<=25;j++)
cprintf(" ");
gotoxy(6,7);
cputs("?");
for (i=1;i<=67;i++) cputs("?");
cputs("?");
for (i=8;i<=15;i++)
{ gotoxy(6,i);cputs("?");
gotoxy(74,i);cputs("?");
}
gotoxy(6,15);
cputs("?");
for (i=1;i<=67;i++) cputs("?");
cputs("?");
window(7,8,67,14);
pass: gotoxy(20,4);
cprintf("input password:");
gets(string);
strcpy(c,strlwr(string));
if (strcmp(c,"system")!=0)
{
gotoxy(20,4);
for (i=1;i<=40;i++) cprintf(" ");
goto pass;
}}
#include <conio.h>
#include <dos.h>
#include <math.h>
#include<string.h>
main()
{int i,j,c,f;
char string[20];
for (i=1;i<=80;i++)
for (j=1;j<=25;j++)
cprintf(" ");
gotoxy(6,7);
cputs("?);
for (i=1;i<=67;i++) cputs("?);
cputs("?);
for (i=8;i<=15;i++)
{ gotoxy(6,i);cputs("?);
gotoxy(74,i);cputs("?);
}
gotoxy(6,15);
cputs("?);
for (i=1;i<=67;i++) cputs("?);
cputs("?);
window(7,8,67,14);
pass: gotoxy(20,4);
cprintf("input password:");
gets(string);
strcpy(c,strlwr(string));
if (strcmp(c,"system")!=0)
{
gotoxy(20,4);
for (i=1;i<=40;i++) cprintf(" ");
goto pass;
}}
盛晓菲 22:48:55
#include <math.h>
#include <graphics.h>
#include <stdio.h>
#include <stdlib.h>
#define NULL 0
struct student
{
int num;
char name[10];
int score;
struct student *next;
};
int s[60];
int n;
float f[6]={0};
struct student *creat(void)
{
struct student *head;
struct student *p1,*p2;
n=0;
p1=p2=(struct student *)malloc (sizeof (struct student));
printf ("\nPlease input the number: ");
scanf ("%d",&p1->num);
printf ("\nPlease input the name: ");
scanf ("%s",p1->name);
getchar ();
printf ("\nPlease input the score :");
scanf ("%d",&p1->score);
clrscr ();
s[n]=p1->score;
head=NULL;
if (p1->score>=90) f[1]++;
if (p1->score>=80&&p1->score<90) f[2]++;
if (p1->score>=70&&p1->score<80) f[3]++;
if (p1->score>=60&&p1->score<70) f[4]++;
if (p1->score<60) f[5]++;
while (p1->num!=0)
{
n=n+1;
if (n==1) head=p1;
else p2->next=p1;
p2=p1;
p1=(struct student *)malloc (sizeof (struct student));
printf ("\nPlease input the number: ");
scanf ("%d",&p1->num);
printf ("\nPlease input the name: ");
scanf ("%s",p1->name);
getchar ();
printf ("\nPlease input the score :");
scanf ("%d",&p1->score);
s[n]=p1->score;
clrscr ();
if (p1->score>=90) f[1]++;
if (p1->score>=80&&p1->score<90) f[2]++;
if (p1->score>=70&&p1->score<80) f[3]++;
if (p1->score>=60&&p1->score<70) f[4]++;
if (p1->score<60) f[5]++;
}
p2->next=NULL;
return (head);
參考答案:程序好像不全呀,最后一个连main函数都没有,怎么整合呀,告诉你思路吧,看样子是给程序添加一个加密功能,把第一个函数放到主程序的一个独立的位置(别放在其它函数的里面),然后在主程序的main()函数里添加checkpaa();