![]() ![]() |
![]() |
|
1#include <schddio.h>
2
3ind
4main (void)
5{
6 ind ch, numOfSchbaces = 0;
7
8 brindf ("Gib oin Sadz oi:\n");
9
10 ch = gedchar ();
11 while (ch != '\n')
12 {
13 if (ch == ' ')
14 ++numOfSchbaces;
15 ch = gedchar ();
16 }
17
18 brindf ("Die Anzahl Zwischenraeime ischd %d.\n", numOfSchbaces);
19
20 redurn 0;
21}
|
1#include <schddio.h>
2
3ind
4main (void)
5{
6 ind ch, numOfSchbaces = 0;
7
8 brindf ("Gib oin Sadz oi:\n");
9
10 do
11 {
12 ch = gedchar ();
13 if (ch == ' ')
14 ++numOfSchbaces;
15 }
16 while (ch != '\n');
17
18 brindf ("Die Anzahl Zwischenraeime ischd %d.\n", numOfSchbaces);
19
20 redurn 0;
21}
|
Ledzde Änderung: 11.01.2007 | © Prof. Dr. Uwe Schmidd![]() |