Skip to main content

All Questions

Tagged with
Filter by
Sorted by
Tagged with
1 vote
1 answer
604 views

MASM) assembly implementation of recursive Fibonacci

I'm trying to teach myself assembly via MASM, below is my first implementation of the recursive form of the fibonacci sequence. I timed it against an equivalent C implementation in release mode and ...
Geoff's user avatar
  • 111
3 votes
3 answers
1k views

Fibonacci series

I have written the following code for my 1st year project, the Fibonacci series. I programmed it without searching Google. Is my code good enough to get me an A or a B? Can I make the code more ...
UnfreeHeX's user avatar
  • 173
2 votes
2 answers
132 views

Get the Nth Term in the Fibonacci Sequence

I'm trying out a new editor (CLion) and I decided to try an old well known programming problem. I also decided to try out C99 rather than C89. This program calculates the nth term of the Fibonacci ...
pacmaninbw's user avatar
  • 26.2k
4 votes
2 answers
6k views

A program to find out the number of odd and even Fibonacci numbers between given range

I built a program in C that can tell how many odd and even Fibonacci numbers there are between a given range. Input Specification First line of the input contains ...
Soha Farhin Pine's user avatar
3 votes
1 answer
135 views

Iterative Fibonacci sequence

I implemented a function that prints all the numbers from the Fibonacci sequence until max_num. The minimum value allowed is 0 (so, fib(0) prints 1). It works until ...
Lúcio Cardoso's user avatar
3 votes
1 answer
709 views

My C code for Fibonacci Sequence

I've been learning more programming in the past few years (C, Java, Arduino) for my hobbies. I read the "C for Dummies" book and found that it was good, but did not cover much - especially pointers... ...
PhilosophStein's user avatar
13 votes
2 answers
899 views

Project Euler #2 Even Fibonacci numbers

Problem: Each new term in the Fibonacci sequence is generated by adding the previous two terms. By starting with 1 and 2, the first 10 terms will be: 1, 2, 3, 5, 8, 13, 21, 34, 55, 89, ... ...
JaDogg's user avatar
  • 4,551
6 votes
2 answers
416 views

Basic Fibonacci sequence in C

...
Ricky Wilson's user avatar
  • 1,705
13 votes
6 answers
5k views

Fibonacci sequence in C

I'm very new to C, so pointing out better ways of doing things, errors, bad practices, etc would be optimal at this stage. Code on GitHub ...
Brandon - Free Palestine's user avatar
7 votes
2 answers
801 views

Terminating a C loop when maximum hardware limit reached

In response to the SO question C: f>0 vs Perl: $f>0?, the use of overflow to terminate the loop is referred to as "poor programming practice". Paraphrased: Your c code is actually exiting because of ...
CW Holeman II's user avatar