fibonacci in c language

fibonaci in c language

  • (2 Pages)
  • +
  • 1
  • 2

22 Replies - 3245 Views - Last Post: 13 April 2009 - 04:15 AM Rate Topic: -----

#1 stevnroni  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 09-October 07

fibonacci in c language

Posted 09 October 2007 - 09:13 AM

please help me in design fibonaci in c language..
i dont know maybe one of u can help me to solve this problem.
thannxxx
Is This A Good Question/Topic? 0
  • +

Replies To: fibonacci in c language

#2 PennyBoki  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 55
  • View blog
  • Posts: 2,345
  • Joined: 11-December 06

Re: fibonacci in c language

Posted 09 October 2007 - 09:22 AM

Yes we can help but we should see an effort on your side first. We will not do your homework. But I suggest you check the snippets area, where you'll find some ideas. And please read the forum rules.
Was This Post Helpful? 0
  • +
  • -

#3 stevnroni  Icon User is offline

  • New D.I.C Head

Reputation: 0
  • View blog
  • Posts: 3
  • Joined: 09-October 07

Re: fibonacci in c language

Posted 09 October 2007 - 09:47 AM

View PostPennyBoki, on 9 Oct, 2007 - 09:22 AM, said:

Yes we can help but we should see an effort on your side first. We will not do your homework. But I suggest you check the snippets area, where you'll find some ideas. And please read the forum rules.


hayy... i already to try find this program but i sure that i'm cant do it..
so i need help....Really isnt my homework but i just want to study about c
thannxx
Was This Post Helpful? 0
  • +
  • -

#4 PennyBoki  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 55
  • View blog
  • Posts: 2,345
  • Joined: 11-December 06

Re: fibonacci in c language

Posted 09 October 2007 - 09:51 AM

Well that is no problem, so try to make the code and if you run into trouble post the code here(IN CODE TAGS) :) so that we can help. Again I ask you please read the rules.
Was This Post Helpful? 0
  • +
  • -

#5 XenoSophist  Icon User is offline

  • New D.I.C Head

Reputation: 1
  • View blog
  • Posts: 36
  • Joined: 02-October 07

Re: fibonacci in c language

Posted 09 October 2007 - 10:14 AM

stevnroni,

i'm not sure if your problem is with how it is to be coded or what the logic is behind the Fibonacci sequence. Wikipedia gives a decent logical explanation. The link is: http://en.wikipedia....onacci_sequence

In terms of coding, it can be easily written using iterations versus recursion, but as PennyBoki said, we can primarily help after seeing some code, albeit how wrong it is.
Was This Post Helpful? 0
  • +
  • -

#6 krizjaz  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 20
  • View blog
  • Posts: 99
  • Joined: 07-October 07

Re: fibonacci in c language

Posted 13 October 2007 - 01:51 PM

Okay. . I just want to help you. . I'm still a student and i understand what you feel. . Not like other guys who does'nt understands us. .

Here's the code for the fibonacci. .

#include<stdio.h>
#include<conio.h>

int main (void)
{
// Local Declarations

   int x, y, num, a, sum;

// Statements

   clrscr();

   printf("Enter how many numbers: ");
   scanf("%d", &num);

   x = 1;
   y = 1;
   sum = 0;

   for (a = 1; a <= num; a++)
   {
	x = y;
	y = sum;
	sum = x + y;
	printf("%5d", sum);
   }

   getch();
   return 0;
}

Was This Post Helpful? 1

#7 zandiago  Icon User is offline

  • D.I.C Head

Reputation: 0
  • View blog
  • Posts: 190
  • Joined: 13-July 07

Re: fibonacci in c language

Posted 13 October 2007 - 01:58 PM

doesn't reaaly help in just giving out the code....defeats the purpose of the forum. He won't learn if someone just gives you the answer....however, if he has tried and sincerely doesn't understand or he's stuck, then we'll pitch in. Your statement that nobody understands you....there is a large percentage of students here.....including myself.
Was This Post Helpful? 0
  • +
  • -

#8 PennyBoki  Icon User is offline

  • D.I.C Lover
  • member icon

Reputation: 55
  • View blog
  • Posts: 2,345
  • Joined: 11-December 06

Re: fibonacci in c language

Posted 13 October 2007 - 02:00 PM

krizjaz, please read the forum rules, you know the rules that you agreed upon when you signed up here. I understand, just as every person here that can help. I'm student too, and I believe that I help more by handing out advise rather than the complete code. But that is my view.
Was This Post Helpful? 0
  • +
  • -

#9 krizjaz  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 20
  • View blog
  • Posts: 99
  • Joined: 07-October 07

Re: fibonacci in c language

Posted 12 April 2009 - 06:40 AM

Hi! The code, as you can see, any high school students can make it. Why do not just give the code? Ok, if the action i've done would make something happen to me like kicking me out of this website, well, there's still so many websites. Why do'nt you give compassion to the needy? Why not help him? "We will not do your homework for you! Do not ask us to give you code!
Use proper English. Correct grammar and spelling is required. " - These are just human rules. Is it fair to those who are in need than to those who are fortunate because they know much than the needy? I may not be an expert, but i offer my idea to the needy. You also help others. And how many times have i done this? Why don't you share what you have? Can you bring all of what you've learned to heaven? That's why we're studying to learn. And that's why we learn to share it to others. Why make it difficult for those who are in need to know what he wants to know? Kick me out of here if you wish. You still don't know how to help others without conditions. If i am in a dying situation, blood is flowing out of my body, will you help me out? Or will you give me conditions before you will help me?
And also, you can't see the effort of others by just looking at the code. What is essential is invisible to the eye.

This code is not something worth paying for. So, why just make it easy for them to see? Would this site be ruined by this code?
Was This Post Helpful? 0
  • +
  • -

#10 FrozenSnake  Icon User is offline

  • En man från Sverige!

Reputation: 123
  • View blog
  • Posts: 1,033
  • Joined: 30-July 08

Re: fibonacci in c language

Posted 12 April 2009 - 06:52 AM

You are NOT helping him if you doesn't let him figure out some for himself. It's more destructive then beneficial.

Sure his problem might be solved but will he know why and how the code works? It's not because we don't wanna help someone it's because its better to understand why things work in certain way.

If I show you how to do everything you might get a working code but can you repeat it in different situations? Probably not.
Was This Post Helpful? 0
  • +
  • -

#11 janotte  Icon User is offline

  • code > sword
  • member icon

Reputation: 991
  • View blog
  • Posts: 5,141
  • Joined: 28-September 06

Re: fibonacci in c language

Posted 12 April 2009 - 07:17 AM

krizjaz you are right that there are plenty of versions of this code available through a Google search so the OP should have taken that approach.

We don't provide code to those who do not or will not try for themselves.
That is not acceptable in this community.
Those 'human rules' that you shrug off are the rules of this community.

If you are not prepared to stay within the community rules and norms then the conclusion about your next step is obvious and I won't insult your intelligence by spelling it out.
Was This Post Helpful? 0
  • +
  • -

#12 JackOfAllTrades  Icon User is offline

  • Saucy!
  • member icon

Reputation: 6246
  • View blog
  • Posts: 24,014
  • Joined: 23-August 08

Re: fibonacci in c language

Posted 12 April 2009 - 09:32 AM

Zombie thread!
Was This Post Helpful? 0
  • +
  • -

#13 janotte  Icon User is offline

  • code > sword
  • member icon

Reputation: 991
  • View blog
  • Posts: 5,141
  • Joined: 28-September 06

Re: fibonacci in c language

Posted 12 April 2009 - 09:35 AM

View PostJackOfAllTrades, on 12 Apr, 2009 - 08:32 AM, said:

Zombie thread!


Oh dear and I let it fed upon my brain.

I am obviously to tired to be here!
Was This Post Helpful? 0
  • +
  • -

#14 krizjaz  Icon User is offline

  • D.I.C Head
  • member icon

Reputation: 20
  • View blog
  • Posts: 99
  • Joined: 07-October 07

Re: fibonacci in c language

Posted 12 April 2009 - 11:45 PM

View PostFrozenSnake, on 12 Apr, 2009 - 05:52 AM, said:

You are NOT helping him if you doesn't let him figure out some for himself. It's more destructive then beneficial.

Sure his problem might be solved but will he know why and how the code works? It's not because we don't wanna help someone it's because its better to understand why things work in certain way.

If I show you how to do everything you might get a working code but can you repeat it in different situations? Probably not.


Ahmm, yes, he can know how the program works. We have brains and we, PEOPLE, are rational. When you won't give him the code, he still can get many codes of various variations in the net. Then, how will you know that he finds efforts from this? We can still understand the code (sometimes) by running the code. By putting inputs and looking at the output of the program, then he can understand the code of the program if he wishes to read and understand and decipher it in his mind. He can still understand the code by himself. There are many ways of understanding the code, just like there are many ways to light up a bulb.

I can repeat a working code in many situations. I have my own opinion and my own understanding if you give me a code. It might not be a pefect code, that is, what you want to have. But i can give you the code in many different outputs.

Don't underestimate the mind of a man. You don't know what's working in his mind.
Was This Post Helpful? 0
  • +
  • -

#15 janotte  Icon User is offline

  • code > sword
  • member icon

Reputation: 991
  • View blog
  • Posts: 5,141
  • Joined: 28-September 06

Re: fibonacci in c language

Posted 12 April 2009 - 11:56 PM

You are missing the point.

The rules here say "don't do that".

If you don't like the rules here you are free to establish a community with a different set of rules.

What you are not free to do is ignore the rules because you believe you have a deeper and better insight into the "mind of man" than others.
Was This Post Helpful? 0
  • +
  • -

  • (2 Pages)
  • +
  • 1
  • 2