All pastes #167504 Raw Edit

Chank

public cpp v1 · immutable
·published 2006-09-12 01:46 UTC
rendered paste body
   1.      #include<iostream>   2.      using namespace std;   3.      int main()   4.      {   5.              int n,aux,aux2;   6.              cout<<"Digite o numero: ";   7.              cin>>n;   8.              aux2 == 0;   9.              aux == 0;  10.                      for(int i = 1; i<=n; i++)  11.              {  12.                      aux2 == (aux2 + 1)*2;  13.              if (aux2 == n)  14.              {  15.              aux == 1;  16.              }  17.              if ( (aux2 != n) && (aux != 1) )  18.                      {  19.                      aux == 0;  20.                      }  21.              }  22.              if (aux == 0) {  23.                      cout << "O numero nao e uma potencia de dois " <<aux2<< endl;  24.                                }  25.              if (aux == 1 ) {  26.                      cout << "O numero e uma potencia de dois" << endl;  27.                                         }  28.      }