|  | 
|  | 
| вернуться в форум | What is lacking in terms? What could I forget? Послано 8P  15 фев 2010 21:23#include <iostream>#include <math.h>
 
 using namespace std;
 
 int main()
 {
 int n,s;
 cin>>n;
 if(n%10==7)
 s=int((n-1)*log((double)2)/log((double)10));
 else
 s=int(n * log((double)2)/log((double)10));
 cout<<s<<endl;
 return 0;
 }
 
 What is lacking in terms? What could I forget?
 | 
 | 
|