Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- class Student {
- public: long n, k=0;
- void zn() {
- cout << "n = " <<n <<endl;
- }
- void kolvo() {
- while (n > 0) {
- k++;
- n = n / 10;
- }
- cout << "N = " << k;
- }
- };
- int main()
- {
- Student abc;
- int x;
- cin >> x;
- abc.n = x;
- abc.zn();
- abc.kolvo();
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement