Advertisement
catalyn

tema pt 30.10.2014 var 2 bac

Oct 30th, 2014
163
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.51 KB | None | 0 0
  1. #include <iostream>
  2.  
  3. using namespace std;
  4. int nr (int a ,int b )
  5. {
  6. int i;
  7. for(i=a;i<=b;i++)
  8. cout<<i<<" ";
  9. return i;
  10. }
  11.  
  12. int rezolva (int a ,int k)
  13. {
  14. int i,ok;
  15. cout<<a<<" "; cin>>a;
  16. cout<<k<<" "; cin>>k;
  17. for(i=a;i<=99999;i++)
  18. {if(i%a==0)
  19. ok++;
  20. else
  21. cout<<"nu se poate";}
  22. return ok;
  23. }
  24.  
  25.  
  26. int main()
  27. {int a,k;
  28. cout<<a<<" "; cin>>a;
  29. cout<<k<<" "; cin>>k;
  30. cout<<nr (a,b);
  31. cout<<rezolva(a,k);
  32. return 0;
  33. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement