Posted By

cuspajzodgraha on 04/14/15


Tagged


Versions (?)

Greyfoxov drugi


 / Published in: C++
 

i opet mora biti neki description pas mater

  1. #include<iostream>
  2. #include<cstdlib>
  3. #include<cmath>
  4. using namespace std;
  5.  
  6. int main(){
  7. int N;
  8. do{
  9. cout<<"Znas kaj: ";
  10. cin>>N;
  11. }while(N<0);
  12. for(int i=0; i<=N; i++)
  13. for(int j=0; j<=N; j++)
  14. if(pow(i,j)==N) cout<<i<<"^"<<j<<endl;
  15. system("PAUSE");
  16. return 0;
  17. }

Report this snippet  

You need to login to post a comment.