如何用C语言编JP程序,已提供部分源程序

cym40011 2003-04-26 10:48:17
#include <stdlib.h>
#include <stdio.h>
#include <time.h>
#include <conio.h>
int i,b,d;
char a[27]="abcdefghijklmnopqistuvwxyz";
void printchar()
{
for(i=0; i<5; i++)
printf("%c",a[(int)((rand() %100)/4)]);
putchar('\t');
}
int main(void)
{
int i=0,k;
char a[27]="abcdefghijklmnopqistuvwxyz";
printf("******************************jp******************************\n");
printf("==============================================================\n");
// for(i=0;i<26;i++)
// {
// printf("%c",a[i]);
// }
// putchar('\n');
// time_t t;
// srand((unsigned) time(&t));
// printf("Ten random numbers from 0 to 26\n\n");

printf("BEGIN\n");
loop://putchar('\n');
for(i=1;i<=40;i++)
{
printchar();
if(i%8==0)
putchar('\n');
}
// for(i=1;i<=5;i++)
// {
// d=getche();
// for(int j=0;j<26;j++)
// {
// if(d==a[i])
// d=' ';
// }
// }

printf("ÊÇ·ñ¼ÌÐø(y or n)?\n");
k=getch();
if(k=='y')
goto loop;

// else
return 0;
}

...全文
64 1 打赏 收藏 转发到动态 举报
写回复
用AI写文章
1 条回复
切换为时间正序
请发表友善的回复…
发表回复
yxc2008 2003-04-26
  • 打赏
  • 举报
回复
up

69,382

社区成员

发帖
与我相关
我的任务
社区描述
C语言相关问题讨论
社区管理员
  • C语言
  • 花神庙码农
  • 架构师李肯
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧