分享
 
 
 

谁能帮我合个程序

王朝知道·作者佚名  2009-10-22
窄屏简体版  字體: |||超大  
 
分類: 電腦/網絡 >> 程序設計 >> 其他編程語言
 
問題描述:

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();

小贴士:① 若网友所发内容与教科书相悖,请以教科书为准;② 若网友所发内容与科学常识、官方权威机构相悖,请以后者为准;③ 若网友所发内容不正确或者违背公序良俗,右下举报/纠错。
 
 
 
免责声明:本文为网络用户发布,其观点仅代表作者个人观点,与本站无关,本站仅提供信息存储服务。文中陈述内容未经本站证实,其真实性、完整性、及时性本站不作任何保证或承诺,请读者仅作参考,并请自行核实相关内容。
2023年上半年GDP全球前十五强
 百态   2023-10-24
美众议院议长启动对拜登的弹劾调查
 百态   2023-09-13
上海、济南、武汉等多地出现不明坠落物
 探索   2023-09-06
印度或要将国名改为“巴拉特”
 百态   2023-09-06
男子为女友送行,买票不登机被捕
 百态   2023-08-20
手机地震预警功能怎么开?
 干货   2023-08-06
女子4年卖2套房花700多万做美容:不但没变美脸,面部还出现变形
 百态   2023-08-04
住户一楼被水淹 还冲来8头猪
 百态   2023-07-31
女子体内爬出大量瓜子状活虫
 百态   2023-07-25
地球连续35年收到神秘规律性信号,网友:不要回答!
 探索   2023-07-21
全球镓价格本周大涨27%
 探索   2023-07-09
钱都流向了那些不缺钱的人,苦都留给了能吃苦的人
 探索   2023-07-02
倩女手游刀客魅者强控制(强混乱强眩晕强睡眠)和对应控制抗性的关系
 百态   2020-08-20
美国5月9日最新疫情:美国确诊人数突破131万
 百态   2020-05-09
荷兰政府宣布将集体辞职
 干货   2020-04-30
倩女幽魂手游师徒任务情义春秋猜成语答案逍遥观:鹏程万里
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案神机营:射石饮羽
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案昆仑山:拔刀相助
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案天工阁:鬼斧神工
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案丝路古道:单枪匹马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:与虎谋皮
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:李代桃僵
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案镇郊荒野:指鹿为马
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:小鸟依人
 干货   2019-11-12
倩女幽魂手游师徒任务情义春秋猜成语答案金陵:千金买邻
 干货   2019-11-12
 
推荐阅读
 
 
 
>>返回首頁<<
 
靜靜地坐在廢墟上,四周的荒凉一望無際,忽然覺得,淒涼也很美
© 2005- 王朝網路 版權所有