Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- const int N = 3;
- int main()
- {
- int a[N];
- int k[N];
- setlocale(LC_ALL, "Rus");
- cout << "Введите элементы массива " << endl;
- for (int i = 0; i < N; i++)
- {
- cin >> a[i];
- }
- cout << "Вывод элементов " << endl;
- for (int i = 0; i < N; i++)
- {
- cout << a[i] << " " << endl;
- }
- cout << " Результат " << endl;
- for (int i = 0; i < N; i++)
- {
- k[i] = 1;
- while (a[i] = a[i] / 10)
- {
- k[i] = k[i] + 1;
- }
- cout << k[i] << endl;
- }
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment