搜索
查看: 1937|回复: 5
打印 上一主题 下一主题

什么情况!翻译不出来⊙﹏⊙b

[复制链接]
跳转到指定楼层
楼主
发表于 2013-8-24 21:08:22 | 只看该作者 回帖奖励 |倒序浏览 |阅读模式
6啊哈币
应该能翻译出来呀,我看不出来哪里有错,可为什么就是翻译不出来,{:soso__7693161671064378406_6:}
#include <stdio.h>
#include <windows.h>
#include <stdlib.h>
int main()
{
  printf("发音器,3秒后开启\n");
  Sleep(3000);
  printf("发声器,按1,2,3,4,5发出声音,6退出发音器\n");
  int a;
  scanf("%d",&a);
  if(a==1)printf("\a");
  if(a==2)Beep(500,1000)
  if(a==3)MessageBeep(MB_OK)
  if(a==4)MessageBeep(MB_ICONHAND)
  if(a==5)MessageBeep(MB_ICONASTERISK)
  if(a==6)
        system("pause");
        return 0;
}




求高手赐教{:soso__17317129641574125945_4:}



沙发
发表于 2013-8-24 21:08:23 | 只看该作者
tjq200236 发表于 2013-8-25 12:00
那怎莫让它,发完一个音后不会关闭,还能再发另一个音那
  1. #include <stdio.h>
  2. #include <windows.h>
  3. #include <stdlib.h>

  4. int main()
  5. {
  6.   printf("发音器,3秒后开启\n");
  7.   Sleep(3000);
  8.   
  9.   
  10.   printf("发声器,按1,2,3,4,5发出声音,6退出发音器\n");
  11.   while(1)
  12. { int a;
  13.   scanf("%d",&a);
  14.   if(a==1)while(1) {printf("\a"); Sleep(1000);if(a==1)break;}
  15.   if(a==2)while(1) {FreeConsole();Beep(50,1000);if(a==2)break;}
  16.   if(a==3)while(1) {FreeConsole();MessageBeep(MB_OK); if(a==3)break;}
  17.   if(a==4)while(1) {FreeConsole();MessageBeep(MB_ICONHAND); if(a==4)break;}
  18.   if(a==5)while(1) {FreeConsole();MessageBeep(MB_ICONASTERISK);if(a==5)break;}
  19.   if(a==6)exit(0);}
  20.   system("pause");
  21.    return 0;
  22. }
复制代码
板凳
发表于 2013-8-24 22:40:40 | 只看该作者
  1. #include <stdio.h>
  2. #include <windows.h>
  3. #include <stdlib.h>

  4. int main()
  5. {
  6.   printf("发音器,3秒后开启\n");
  7.   Sleep(3000);
  8.   
  9.   {
  10.   printf("发声器,按1,2,3,4,5发出声音,6退出发音器\n");
  11.   int a;
  12.   scanf("%d",&a);
  13.   if(a==1)printf("\a");
  14.   if(a==2) FreeConsole();Beep(500,1000);
  15.   if(a==3) FreeConsole();MessageBeep(MB_OK);
  16.   if(a==4) FreeConsole();MessageBeep(MB_ICONHAND);
  17.   if(a==5) FreeConsole();MessageBeep(MB_ICONASTERISK);
  18.   if(a==6)exit(0);}
  19.         system("pause");
  20.         return 0;
  21. }
复制代码

评分

参与人数 1啊哈币 +3 收起 理由
李掌柜 + 3 赞一个!

查看全部评分

地板
 楼主| 发表于 2013-8-25 11:44:49 | 只看该作者
哦{:soso_e100:}
5#
 楼主| 发表于 2013-8-25 12:00:01 | 只看该作者
超神级 发表于 2013-8-24 22:40

那怎莫让它,发完一个音后不会关闭,还能再发另一个音那
6#
发表于 2013-8-25 14:10:16 | 只看该作者
tjq200236 发表于 2013-8-25 12:00
那怎莫让它,发完一个音后不会关闭,还能再发另一个音那
  1. #include <stdio.h>
  2. #include <windows.h>
  3. #include <stdlib.h>

  4. int main()
  5. {
  6.   printf("发音器,3秒后开启\n");
  7.   Sleep(3000);
  8.   
  9.   
  10.   printf("发声器,按1,2,3,4,5发出声音,6退出发音器\n");
  11.   while(1)
  12. { int a;
  13.   scanf("%d",&a);
  14.   if(a==1)while(1) {printf("\a"); Sleep(1000);if(a==1)break;}
  15.   if(a==2)while(1) {FreeConsole();Beep(50,1000);if(a==2)break;}
  16.   if(a==3)while(1) {FreeConsole();MessageBeep(MB_OK); if(a==3)break;}
  17.   if(a==4)while(1) {FreeConsole();MessageBeep(MB_ICONHAND); if(a==4)break;}
  18.   if(a==5)while(1) {FreeConsole();MessageBeep(MB_ICONASTERISK);if(a==5)break;}
  19.   if(a==6)exit(0);}
  20.   system("pause");
  21.    return 0;
  22. }
复制代码
您需要登录后才可以回帖 登录 | 立即注册

本版积分规则

广播台
特别关注
快速回复 返回顶部 返回列表