|
7#
![](static/image/common/ico_lz.png)
楼主 |
发表于 2018-2-5 09:11:15
|
只看该作者
[mw_shl_code=c,true]#include "stdio.h"
#include<string.h>
int a,b,c;
char *str1[3]={"","少年贫穷","少年聪慧","少年立志"};
char *str2[3]={"","中年劳累","中年贫穷","中年富裕"};
char *str3[3]={"","晚年幸福","晚年贫穷","晚年子女不孝"};
void main()
{
puts(" 周易算命");
puts(" @ @ @@@ ");
puts(" @ @@@@@@ ");
puts(" @ @@ @@ @@ ");
puts(" @ @@@@@@ ");
puts(" @ @@@@@ ");
puts(" @ @@@ ");
puts(" @ @ @");
puts("出生年月日");
scanf("%d",&a);
scanf("%d",&b);
scanf("%d",&c);
char ra[10];
char rb[10];
char rc[10];
int tc;
srand(a);
strcpy(ra,str1[(rand()%3+1)]);
srand(b);
strcpy(rb,str2[(rand()%3+1)]);
srand(c);
strcpy(rc,str3[(rand()%3+1)]);
printf("%s,%s,%s.",ra,rb,rc);
getch();
}[/mw_shl_code]
开源! |
|