首页 > 试题广场 >

编写一个程序,发出警报声,并打印下列文字: S

[问答题]

编写一个程序,发出警报声,并打印下列文字:

Startled by the sudden sound, Sally shouted, "By the Great Pumpkin,  what was that!"

推荐
#include<stdio.h>
int main(void)
{
 printf("\aStartled by the sudden sound,Sally shouted,\"By the Great pumpkin,what was that!\"\n");
 return(0);
}

发表于 2018-05-05 21:31:04 回复(0)
#include <stdio.h>
#include <stdlib.h>
#include <windows.h>

int main () {
    // 双引号,注意转义
    printf("Startled by the sudden sound, Sally shouted, \"By the Great Pumpkin,  what was that!\"\n");
        //哆来咪发...
    Beep(523,500);
    Beep(587,500);
    Beep(659,500);
    Beep(698,500);
    Beep(784,500);
    Beep(880,500);
    Beep(980,500);
    Beep(1060,500);

    Sleep(500);

    Beep(523,500);
    Beep(587,500);
    Beep(659,500);
    Beep(698,500);
    Beep(784,500);
    Beep(880,500);
    Beep(980,500);
    Beep(1060,500);

    return(0);
}
编辑于 2019-01-13 15:13:05 回复(0)
#include<stdio.h>
int main(void)
{
printf("\a");
printf("Startled by the sudden sound, Sally shouted, \"By the Great Pumpkin,  what was that!\\n");

return 0;
}


编辑于 2020-08-03 17:49:37 回复(0)
#include <stdio.h>
int main(void)
{
printf("\aStartled by the sudden sound, Sally shouted,\n\"By the Great Pumpkin,  what was that!\"");
return 0;
}

发表于 2020-06-12 15:52:06 回复(0)
#include<stdio.h>
int main(){
    printf("/a");
    printf("Startled by the sudden sound, Sally shouted,\ "By the Great Pumpkin,  what was that!\"");
}

发表于 2020-01-12 16:06:29 回复(0)