Advertisement
InnaSibirova

Nur 4 исправ.

Dec 28th, 2021
1,182
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.29 KB | None | 0 0
  1. #include <stdio.h>
  2.  
  3. int main()
  4. {
  5.     int n = 0, x, p, proiz;
  6.     scanf("%d", &x);
  7.     scanf("%d", &p);
  8.     proiz = x;
  9.     for(int i = 1; i < p; i++) {
  10.         proiz *= x;
  11.     }
  12.     while(proiz > 0) {
  13.         proiz /= 10;
  14.         n++;
  15.     }
  16.     printf("%d", n);
  17.     return 0;
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement