asmodeus94

wskaznikTabChar

Nov 6th, 2013
71
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.37 KB | None | 0 0
  1. #include <iostream>
  2. #include<cstdio>
  3. using namespace std;
  4. char tab[40];
  5. int policz(){
  6.     char *wsk;
  7.     int licz=0;
  8.     wsk=tab;
  9.     do{
  10.         if(*wsk!='\0') licz++;
  11.         wsk++;
  12.     }while(*wsk!='\0');
  13.     return licz;
  14. }
  15. int main(){
  16.     system("cls");
  17.     cout<<"Napisz cos: ";
  18.     cin.getline(tab,40);
  19.     cout<<"Znakow: "<<policz();
  20.     getchar();
  21. }
Advertisement
Add Comment
Please, Sign In to add comment