473,405 Members | 2,334 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,405 software developers and data experts.

running fabonacci in c programming.. someone please help me...

i need to implement the fibonacci number sequence

here is an example output of the program:

Server:Waiting for connection
Server:Receive connection from client
Client:10
Server:Print 10 Fibonacci
Server:1 1 2 3 5 8 13 21 34 54
Client:1 1 2 3 5 8 13 21 34 54

if Client send value of 5, the output would be 1 1 2 3 5
Jun 19 '13 #1
2 1030
Nepomuk
3,112 Expert 2GB
Hi 1992amar and welcome to bytes.com!

OK, that sounds like an interesting task. We won't solve the problem for you (especially as it sounds like homework and our posting guidelines have strict rules against those questions) but we'll be happy to help you solve it yourself. So, what have you done so far? What ideas have you had? How would the program have to be split up?
Jun 19 '13 #2
whodgson
542 512MB
You probably have noticed that after the first two digits each succeeding number is the sum of the previous two in the series.
Also that the client number could be used in a loop condition
to stop it entering further sums (n) + (n-1) into an array.
Jun 24 '13 #3

Sign in to post your reply or Sign up for a free account.

Similar topics

0
by: PHP2 | last post by:
can someone help me instal CGI C++ library on Linux http://www.vbmcgi.org/
5
by: shang | last post by:
Hi! I am trying to find a function that converts a string into a double or a long double number. I found atod() but I don't know which library I have to include to use it. Could someone help me? ...
1
by: Eric Borden | last post by:
I have created the following classes (psuedo code example): BaseClass protected method BaseClass.Foo(object Test) { Test = new object(); } MyClass : BaseClass private object myProperty;...
3
by: Marek | last post by:
Hello gurus! I wrote a code in VBS, that will check, that current user is in one from three groups. But i don't know how asimilate it with asp.net. This page will be a bridge between 2 - main...
0
by: Alan Silver | last post by:
Hello, I am having a problem setting and resetting cookies. I'm sure I just doing something really stupid as this is such a basic issue, but I can find any answer. Please can someone help me? ...
5
by: Mike_August | last post by:
Could someone help me out with the following? I've got 1)an xml file 2)an xsl 3)a schema My namespaces are as follow molecular_db.xml
1
by: jalexa9898 | last post by:
I would like to get a hold of some software that teaches me xml can someone help me find one?
2
by: shblack | last post by:
Please can someone help me with this program. I am in a JAVA programming class and I am having a heck of a time. I am still having a problem with the basic concepts of JAVA but the teacher continues...
1
by: onequestion | last post by:
Hi friends.. Is it possible to find subdomains on a domain. Can someone help me? currently i'm using this code.. private static String GetSubDomain(URL url) ...
30
by: Anarki | last post by:
The following is the program i am trying to compile //restrict.c #include <stdio.h> int main() { char arr = "Qualifiers" char * restrict p = arr; int i = 0; for(; i < 10; ++i)
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.