MouseyN1

pseudo

Feb 15th, 2013
151
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.77 KB | None | 0 0
  1. #include <iostream>
  2. #define spune cout
  3. #define memoreaza cin
  4. #define daca if
  5. #define cattimp while
  6. #define altfel else
  7. #define pentru for
  8. #define returneaza return
  9. #define intreg int
  10. #define vid void
  11. #define folosind using
  12. #define spatiudenume namespace
  13. #define procent %
  14. #define plus +
  15. #define asta <<
  16. #define totasta >>
  17. #define maimicsauegal <=
  18. #define egal ==
  19.  
  20. folosind spatiudenume std;
  21. intreg ndiv(intreg n, intreg div)
  22. {
  23. daca(div maimicsauegal n)
  24. daca(n procent div egal 0)
  25. returneaza 1 plus ndiv(n, div plus 1);
  26. altfel returneaza ndiv(n, div plus 1);
  27. altfel returneaza 0;
  28. }
  29.  
  30. intreg main(vid)
  31. {
  32. intreg n, div=1;
  33. spune asta "n=";
  34. memoreaza totasta n;
  35. spune asta n asta " are " asta ndiv(n, div) asta " divizori.";
  36. returneaza 0;
  37. }
Advertisement
Add Comment
Please, Sign In to add comment