Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- unsigned int cicl(unsigned int n)
- {
- unsigned int counter;
- int result;
- int var;
- if (n == 0) {
- result = 0;
- }
- else {
- if (n == 1) {
- result = 1;
- }
- else {
- var = 0;
- result = 1;
- counter = 2;
- while (counter <= n + 1) {
- result = result + var;
- var = result - var;
- counter = counter + 1;
- }
- }
- }
- return result;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement