- 13
- 0
- 约9.76千字
- 约 11页
- 2016-04-14 发布于安徽
- 举报
C语言小程序(可自己添加功能).doc
//VC6.0环境下编译,需下载easyx
//时间:2015年7月7日
//刚学计算机C语言,自己编写的一个小程序
#include graphics.h
#includestdio.h
#include math.h
#include time.h
#includestring.h
#includestdlib.h
#includeconio.h
#includewindows.h
#define PI 3#define MAXSTAR 200
void xing();
void arrow();
void ziqi();
void andriod();
void rose();
void siyecao();
void menu()
{
printf( ╪╪╪╪╪╪╧╧╧╧╧╧╧╧╪╪╪╪╪╪\n);
printf(╔═══╧╧C语言小程序 ╧╧═══╗\n);
printf(║※1.实现10分钟内的定时关闭计算机 ║\n);
printf(║※2.立即关闭计算机 ║\n);
printf(║※3.注销计算机 ║\n);
printf(║※4.打开注册表 ║\n);
printf(║※5.打开记事本 ║\n);
printf(║※6.查询本机IP地址 ║\n);
printf(║※7.输出心型图案 ║\n);
printf(║※8.修改系统密码 ║\n);
printf(║※9.输出玫瑰花图案 ║\n);
printf(║※A.画一个箭头 ║\n);
printf(║※C.将程序写入开机自启 ║\n);
printf(║※D.画一个安卓机器人 ║\n);
printf(║※E.画一朵四叶草 ║\n);
printf(║※0.退出系统 ║\n);
printf(╚═══════════════════╝\n);
}
struct DOT
{
double x;
double y;
double z;
double r; // 红色
double g; // 绿色
// b(蓝色) 通过 r 计算
};
void main()
{
system(title C语言小程序--王熠);//设置cmd窗口标题
system(mode con cols=48 lines=25);//窗口宽度高度
system(color 0C);
system(date /T);
system(TIME /T);
menu();
char cmd[20]=shutdown -s -t ;
char mima[30]=net user administrator ;
char t[5]=0;
char s[7]=0;
char ch;
ch=getch();
{
if(ch==1)
{printf(你想在多少秒后自动关闭计算机?(0~600)\n);
scanf(%s,t);
system(strcat(cmd,t));
}
if(ch==2)
{system(shutdown -p);
}
else if(ch==3)
{system(shutdown -l);
}
else if(ch==4)
{system(regedit.exe);
}
else if(ch==5)
{system(notepad);
}
else if(ch==6)
{system(ipconfig);
}
else if(ch==7)
{xing();
}
else if(ch==8)
{printf(请输入密码(仅改变系统管理员账号administrator密码):\n);
scanf(%s,s);
system(strcat(mima,s));
}
else if(ch==9)
{rose();
}
else if(ch==A||ch==a)
{arrow();
}
else if(ch==C||ch==c)
{ziqi();
}
else if(ch==D||ch==d)
{andriod();
}
else if(ch==E||ch==e)
{siyecao();
}
else if(ch==0)
{system(tskill cmd);
}
else
printf(王熠制作\n);
}
system(pause);
exi
原创力文档

文档评论(0)