Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <string.h>
- using namespace std;
- int main(int argc,char ** argv)
- {
- int ln = strlen(argv[1]);
- int anzahl=0;
- const char * zeichen=" ";
- char po =*zeichen;
- for(int x=0;x < ln;x++)
- {
- if(argv[1][x] == po)
- {
- anzahl++;
- }
- }
- anzahl++;
- cout << anzahl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment