beeps.c
来自「这是一个900个c语言经典例子的电子书教程,文件格式是pdf,需要下载大家pdf」· C语言 代码 · 共 16 行
C
16 行
#include <stdio.h>
#include <stdlib.h>
void main (int argc, char *argv[])
{
int count; // The number of times to sound the speaker
int i; // The number of times the speaker has been sounded
// Determine the number of times to ring the bell
count = atoi(argv[1]);
for (i = 0; i < count; i++)
putchar(7); // ASCII 7 sounds the speaker
}
⌨️ 快捷键说明
复制代码Ctrl + C
搜索代码Ctrl + F
全屏模式F11
增大字号Ctrl + =
减小字号Ctrl + -
显示快捷键?