VC用Beep整几首歌听听~~~
//生日快乐歌
#include "stdafx.h"
#include <windows.h>
void main(void)
{
unsigned FREQUENCY[] = {392,392,440,392,523,494,
392,392,440,392,587,523,
392,392,784,659,523,494,440,
689,689,670,523,587,523};
unsigned DELAY[] = {375,125,500,500,500,1000,
375,125,500,500,500,1000,
375,125,500,500,500,500,1000,
375,125,500,500,500,1000};
int i;
for (i = 0; i < 25; i++)
{
Beep(FREQUENCY[i], DELAY[i]);
}
}
//小酒窝
#include "stdafx.h"
#include <iostream>
#include <windows.h>
enum fy{
d1 = 262,
d1_ = 277,
d2 = 294,
d2_ = 311,
d3 = 330,
d4 = 349,
d5 = 392,
d5_= 415,
d6 = 440,
d6_= 466,
d7 = 494,
z1 = 523,
z1_ = 554,
z2 = 578,
z2_ = 622,
z3 = 659,
z4 = 698,
z4_ = 740,
z5 = 784,
z5_ = 831,
z6 = 880,
z6_ = 932,
z7 = 988,
g1 = 1046,
g1_ = 1109,
g2 = 1175,
g2_ = 1245,
g3 = 1318,
g4 = 1397,
g4_ = 1480,
g5 = 1568,
g5_ = 1661,
g6 = 1760,
g6_ = 1865,
g7 = 1976,
yaya = 0
};
struct yf
{
enum fy s;
int t;
};
int main()
{
int n = 0;
struct yf a[1000]={{z3,125},{z3,50},{z4,100},{z3,50},{z2,50}, //5
{z2,125},{z2,50},{z5,100},{z2,50},{z1,50}, //10
{z1,125},{z1,50},{z6,100},{z5,100}, //14
{z3,125},{z4,25},{z3,25},{z2,100},{z2,100}, //19
{z3,125},{z3,50},{z4,100},{z5,50},{z3,50}, //24
{z5,125},{z5,50},{g2,100},{z7,50},{g1,50}, //29
{g1,200},{g1,50},{z7,50},{z6,50},{z7,50}, //34
{g1,125},{z7,50},{g1,200}, //37
{g1,50},{z7,50},{g1,50},{z7,50},{g1,100},{z3,50},{z5,50}, //44
{z5,250},{z6,50},{z7,50}, //47
{g1,50},{z7,50},{g1,50},{z7,50},{g1,100},{g2,100},{g3,100}, //54
{g3,300},{z6,50},{z7,50}, //57
{g1,50},{z7,50},{g1,50},{z7,50},{g1,100},{g3,100}, //63
{z7,50},{z6,50},{z7,50},{z6,50},{z7,50},{z5,50},{z5,50},{g1,50}, //71
{g1,200},{g3,75},{g4,25},{g4,50},{g3,50}, //76
{g2,200},{yaya,50},{z5,50},{g1,50},{g2,50}, //81
{g3,50},{g1,50},{g1,50},{z5,50},{z5,100},{z5,50},{g3,50}, //88
{g2,50},{g3,50},{g2,50},{g1,50},{z5,50},{z5,50},{z6,50},{z7,50}, //96
{g1,50},{z6,50},{z6,50},{z3,50},{z3,100},{yaya,50},{z7,50}, //103
{g1,50},{z7,50},{g1,50},{g2,50},{z6,50},{z5,50},{z5,100}, //110
{z6,100},{z5,50},{z6,50},{z7,100},{g3,50},{g4,50}, //116
{g3,50},{g4,50},{g3,50},{g2,50},{g2,50},{g1,100},{z5,50}, //123
{z5,50},{z4,50},{z4,50},{g1,50},{g1,50},{g3,50},{g3,50},{g1,50}, //131
{g2,200},{yaya,50},{z5,50},{g1,50},{g2,50}, //136
{g3,50},{g1,50},{g1,50},{z5,50},{z5,100},{z5,50},{g3,50}, //143
{g2,50},{g3,50},{g2,50},{g1,50},{z5,50},{z5,50},{z6,50},{z7,50}, //151
{g1,50},{z6,50},{z6,50},{z3,50},{z3,100},{z3,50},{z7,50}, //158
{g1,50},{z7,50},{g1,50},{g2,50},{z6,50},{z5,50},{z5,100}, //165
{z6,50},{z7,50},{g1,50},{g2,100},{g3,50},{g4,50}, //171
{g3,50},{g4,50},{g2,50},{g1,50},{g2,50},{g1,50},{g1,100}, //178
{g2,50},{g1,50},{g2,50},{z6,50},{g1,100},{g2,50},{g1,50}, //185
{g1,400}, //186
{g2,50},{g1,50},{g2,50},{z6,50},{z7,100},{z7,50},{g1,50}, //193
{g1,400}, //194
};
struct yf *atop;
atop = a;
n = 194;
while(n--)
{
Beep(atop->s,atop->t*5);
atop++;
}
return 0;
}
VC用Beep整几首歌听听~~~的更多相关文章
- [zt]给你的Mp4大换血,精选Touch里3年收集的900多首歌,"经典不忍去的""最新近流行的",与你共享~~
如果你是音乐爱好者: 这些歌, 请戴上耳机, 调大音量, 一个人听 ,全世界 都是你的!!!!! (一)这些歌很温暖,没有金属味,适合有阳光的午后,很悠闲... [Anaesthesia]Maximi ...
- 09、 在QQ音乐中查找七里香这首歌的精彩评论
找到七里香这首歌的精彩评论 URL https://c.y.qq.com/base/fcgi-bin/fcg_global_comment_h5.fcg?g_tk=5381&l ...
- SICAU-OJ:要我唱几首歌才能够将你捕捉
要我唱几首歌才能够将你捕捉 题意: 有N种颜色的牛,现在可以执行以下两种操作: 1.抓捕一只牛,代价为ai: 2.花费x的代价使用魔法,让所有颜色加1,N会变为1. 求得到N种颜色的牛最少花费的代价. ...
- BUUCTF-来首歌吧
来首歌吧 歌曲题目一般就是整个摩斯电码 看上面的样子应该就是摩斯电码解密一下 ..... -... -.-. ----. ..--- ..... -.... ....- ----. -.-. -... ...
- python 虾米停服了...用python爬取虾米最近播放的1000首歌
1. 虾米关服 在这里插入图片描述 用了5年多的音乐软件就这么说关就关了,确实让人心里不好受 ,虽然再去一个新的app里,让它们的算法熟悉你的喜好也不是很困难,可我还是习惯虾米的界面.虾米现在可以支持 ...
- 每年六一儿童节,牛客都会准备一些小礼物去看望孤儿院的小朋友,今年亦是如此。HF作为牛客的资深元老,自然也准备了一些小游戏。其中,有个游戏是这样的:首先,让小朋友们围成一个大圈。然后,他随机指定一个数m,让编号为0的小朋友开始报数。每次喊到m-1的那个小朋友要出列唱首歌,然后可以在礼品箱中任意的挑选礼物,并且不再回到圈中,从他的下一个小朋友开始,继续0...m-1报数....这样下去....直到剩下
// test20.cpp : 定义控制台应用程序的入口点. // #include "stdafx.h" #include<iostream> #include< ...
- pygame “音乐盒”---- 播放一首歌& 点击对话框后背景以及对话框大小改变
有时,你用pygame写的游戏也许需要播放一些背景音乐,该怎么做呢,直接上代码: 下面的代码,有关于: 1>设置对话框图标.大小.标题 2>播放音乐 3>设置背景图片,以及获取背景图 ...
- 给我半首歌的时间,给你说明白Immutable List
先看再点赞,给自己一点思考的时间,微信搜索[沉默王二]关注这个靠才华苟且的程序员.本文 GitHub github.com/itwanger 已收录,里面还有一线大厂整理的面试题,以及我的系列文章. ...
- python爬虫下载文件
python爬虫下载文件 下载东西和访问网页差不多,这里以下载我以前做的一个安卓小游戏为例 地址为:http://hjwachhy.site/game/only_v1.1.1.apk 首先下载到内存 ...
随机推荐
- 解决Android7.1.1中无法打开/data目录的问题
声明:本技巧借鉴https://segmentfault.com/a/1190000008416511这个大神的文章 一.复制android Sdk安装目录的platform-tools路径: 二.w ...
- cplusplus.com
1/ http://www.cplusplus.com/reference/map/multimap/find/ 2. C
- GreenDao 多表事务操作
场景:Android APP多表操作事务管理 使用Android自带的sql操作类操作的时候需要手动处理事务,使用GreenDao的时候不用管了,啥都处理好了.但是,如果是多表操作的话,怎么统一管理事 ...
- cell 配置
Cells Cell configuration options Configure the API (top-level) cell Configure the child cells Config ...
- PostgreSQL的日志文件介绍
PostgreSQL的日志文件 pg_log:数据库活动日志(也就是数据库的操作日志): pg_xlog:事务日志: pg_clog:事务状态日志(pg_clog是pg_xlog的辅助日志). 现在主 ...
- php/oracle: 解析oracle表中的NCLOB,CLOB字段里面的内容
php/oracle: 解析oracle表中的NCLOB,CLOB字段里面的内容 假如你的字段名是:passenger_info 字段类型是:NCLOB/CLOB,在读表的时候,需要将 passeng ...
- ipconfig | find /i "ipv4"
C:\Users\Bob>ipconfig|find /i "IPv" 本地链接 IPv6 地址. . . . . . . . : fe80::d495:6e3:6368 ...
- java.net.SocketException: No buffer space available 异常
http://stackoverflow.com/questions/10088363/java-net-socketexception-no-buffer-space-available-maxim ...
- 用js生成rgb颜色
var drawing=document.getElementById("drawing"); drawing.onclick= function () { var x, y, z ...
- 在ios7中使用zxing
ZXing(Github镜像地址)是一个开源的条码生成和扫描库(开源协议为Apache2.0).它不但支持众多的条码格式,而且有各种语言的实现版本,它支持的语言包括:Java, C++, C#, Ob ...