Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cmath>
- using namespace std;
- int main()
- {
- setlocale(LC_ALL,"Russian");
- double t, m, k=0;
- cout<<"Введите m больше чем 1:"<<endl;
- cin>>m;
- while(1){
- t=pow(4,k);
- if(t>=m){k--;break;}
- k++;
- }cout<<"Число k равно "<<k<<endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment