• 博客园logo
  • 会员
  • 周边
  • 新闻
  • 博问
  • 闪存
  • 众包
  • 赞助商
  • Chat2DB
    • 搜索
      所有博客
    • 搜索
      当前博客
  • 写随笔 我的博客 短消息 简洁模式
    用户头像
    我的博客 我的园子 账号设置 会员中心 简洁模式 ... 退出登录
    注册 登录
FightingForWorldFinal
博客园    首页    新随笔    联系   管理    订阅  订阅
2013年8月16日
用c语言实现作曲与播放教程~,原创哦~
摘要: 本程序可以通过输入简谱用windows自带蜂鸣器函数播放出音乐,会编程的你可以借此在朋友面前show一下啦,哈哈首先,下面这个是样例程序,里面有《国歌》《樱花草》《菊花台》《朋友》《生日快乐》这几首歌曲,以后有时间再做一些播放直接引用相应函数即可 1 #include 2 #include 3 void check(); 4 void Birthday(); 5 void JuHuaTai(); 6 void YingHuaCao(); 7 void GuoGe(); 8 void PengYou(); 9 int main() 10 { 11 PengYou(); ... 阅读全文
posted @ 2013-08-16 23:48 Sky-J 阅读(1213) 评论(0) 推荐(0)
实现彩色文字
摘要: 1 #include 2 #include 3 //GetStdHandle和SetConsoleTextAttribute在头文件windows.h中 4 #include 5 using namespace std; 6 void SetColor(unsigned short ForeColor=3,unsigned short BackGroundColor=0) 7 //给参数默认值,使它 8 //可以接受0/1/2个参数 9 { 10 HANDLE hCon = GetStdHandle(STD_OUTPUT_HANDLE); //本例以输出为例 11 SetC... 阅读全文
posted @ 2013-08-16 22:52 Sky-J 阅读(223) 评论(0) 推荐(0)
贪吃蛇
摘要: 1 #include 2 #include 3 #include 4 #include 5 #include 6 #define MAX__X 23 7 #define MAX__Y 50 8 #define MAX_FOOD 50 9 #define ESC 27 10 #define SPACE 32 11 12 typedef struct Node 13 { 14 int x; 15 int y; 16 struct Node *next; 17 } Node,*LinkList; 18 19 typedef struct 20... 阅读全文
posted @ 2013-08-16 22:50 Sky-J 阅读(235) 评论(0) 推荐(0)
分数类
摘要: 1 #include 2 #include 3 using namespace std; 4 class Fract 5 { 6 public: 7 Fract(){num=0;den=1;} 8 Fract(int a=0,int b) 9 { 10 if(b==0) 11 { 12 cout>(istream &in,Fract &a);//重载>> 49 friend Fract operator * (const Fract &a,int i);//分数乘整数 50 ... 阅读全文
posted @ 2013-08-16 22:49 Sky-J 阅读(266) 评论(0) 推荐(0)
胡搞之读心术
摘要: #include#includevoid main(){ float a,e,check1; int b,c,d; char w; printf("=====================读心术======================\n\n"); printf("请按照以下要求计算,你将会看到这个神奇的数字:1089\n"); printf("请输入一个三位数,百位和十位不要相同:\n"); scanf("%f",&a); b=a/100; c=a/10-b*10; d=a-c*10-b*100; 阅读全文
posted @ 2013-08-16 22:48 Sky-J 阅读(169) 评论(0) 推荐(0)
博客园  ©  2004-2026
浙公网安备 33010602011771号 浙ICP备2021040463号-3