编写一个程序,发出警报声,并打印下列文字:
Startled by the sudden sound, Sally shouted, "By the Great Pumpkin, what was that!"
#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);
}
#include<stdio.h> int main(void) { printf("\aStartled by the sudden sound,Sally shouted,\"By the Great pumpkin,what was that!\"\n"); return(0); }