41 lines
703 B
C++
41 lines
703 B
C++
//#include <iostream>
|
|
//
|
|
//using namespace std;
|
|
//
|
|
//int main() {
|
|
// long long x;
|
|
// cout << "Number: ";
|
|
// cin >> x;
|
|
// long long y;
|
|
// y = llabs(x);
|
|
// if (y == 0) {
|
|
// cout << "Digits: 1\n";
|
|
// cout << "Sum: 0\n";
|
|
// cout << "Avg: 0\n";
|
|
// cout << "Zeros: 1\n";
|
|
// return 0;
|
|
// }
|
|
// int c;
|
|
// c = 0;
|
|
// int s;
|
|
// s = 0;
|
|
// int z;
|
|
// z = 0;
|
|
// while (y > 0) {
|
|
// int d;
|
|
// d = y % 10;
|
|
// s += d;
|
|
// if (d == 0) z++;
|
|
// y /= 10;
|
|
// c++;
|
|
// }
|
|
// double a;
|
|
// a = (c == 0) ? 0.0 : (double)s / c;
|
|
// cout << "Digits: " << c << "\n";
|
|
// cout << "Sum: " << s << "\n";
|
|
// cout << "Avg: " << a << "\n";
|
|
// cout << "Zeros: " << z << "\n";
|
|
// return 0;
|
|
//}
|
|
//
|