Цикл 4
unknown
c_cpp
2 years ago
227 B
4
Indexable
#include <stdio.h> #include <math.h> int main() { double n; int k = 0; scanf("%lf", &n); while (n >= 2) { k = k + 1; n = n / 2; } printf("%d", k); return 0; }
Editor is loading...
#include <stdio.h> #include <math.h> int main() { double n; int k = 0; scanf("%lf", &n); while (n >= 2) { k = k + 1; n = n / 2; } printf("%d", k); return 0; }