Advertisement
icatalin

celelalte 2 functii in caiet Problema 4 Ba

Oct 8th, 2014
172
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.30 KB | None | 0 0
  1. using namespace std;
  2.  
  3. int rezolva()
  4. {
  5.     n,nrc,i,x;
  6.     cout<<"n= ";cin>>n;
  7.     nrc=nrcif(n);
  8.     x=pow(10,nrc-1);
  9.     for (i=1;i<=nrc;i++)
  10.     {
  11.         if ( f(n)!=1)
  12.             return 0;
  13.             n=n%x*10+n/x;
  14.     }
  15.     return 1;
  16. }
  17.  
  18.  
  19. int main()
  20. {
  21.     rezolva();    
  22.     return 0;
  23. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement