SHOW:
|
|
- or go back to the newest paste.
| 1 | #include <iostream> | |
| 2 | #include <string.h> | |
| 3 | using namespace std; | |
| 4 | int main(int argc,char ** argv) | |
| 5 | {
| |
| 6 | int ln = strlen(argv[1]); | |
| 7 | int anzahl=0; | |
| 8 | const char * zeichen=" "; | |
| 9 | char po =*zeichen; | |
| 10 | for(int x=0;x < ln;x++) | |
| 11 | {
| |
| 12 | if(argv[1][x] == po) | |
| 13 | {
| |
| 14 | anzahl++; | |
| 15 | } | |
| 16 | - | } |
| 16 | + | } |
| 17 | anzahl++; | |
| 18 | cout << anzahl; | |
| 19 | return 0; | |
| 20 | } |