📄 while.c
字号:
/* Demonstration einer while-Schleife */
#include <stdio.h>
int main()
{
int d=8;
int hoehe = 16; /* Schleifenvariablen */
float volumen, pi = 3.1415;
while(hoehe <= 24)
{
volumen =(float) d*d*pi/4*hoehe;
/* 1 Kubikzentimeter entspricht 1 Milliliter */
printf("Hoehe %d cm=%.2f ml\n",hoehe,volumen);
hoehe++;
}
return 0;
}
⌨️ 快捷键说明
复制代码
Ctrl + C
搜索代码
Ctrl + F
全屏模式
F11
切换主题
Ctrl + Shift + D
显示快捷键
?
增大字号
Ctrl + =
减小字号
Ctrl + -