Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include<cstdio>
- using namespace std;
- char tab[40];
- int policz(){
- char *wsk;
- int licz=0;
- wsk=tab;
- do{
- if(*wsk!='\0') licz++;
- wsk++;
- }while(*wsk!='\0');
- return licz;
- }
- int main(){
- system("cls");
- cout<<"Napisz cos: ";
- cin.getline(tab,40);
- cout<<"Znakow: "<<policz();
- getchar();
- }
Advertisement
Add Comment
Please, Sign In to add comment