answersLogoWhite

0


Best Answer

//Lucas series - 2,1,3,4,7,11,18

#include <stdio.h>

#define PRINTMAX 50

void lucas(int first, int second) //Prints 52 numbers

{

int count=1,total;

printf("%d\t%d\t",first,second);

while (count < PRINTMAX)

{

total = second + first;

printf("%d\t",total);

first = second;

second = total;

count++;

}

}

int main(void)

{

lucas(2,1);

return 0;

}

User Avatar

Wiki User

14y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Write a c programme with lucas series?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Write a c programme to draw a rainbow?

Write a C program to Draw a RAINBOW and fill the suitable colors ...


Write a C programme to count the number of vowals present in your name?

abhimanyu


Write a programme for substraction of two numbers in c language?

substracion of any two number program in c


How do you write c programme to find proper subset of a given string?

you can use strstr()


How do you use this function in c programme?

I don't use that function in C programme.


Write a c programme to print all the even numbers in descending order?

#include(stdio.h) int main ()


How do you write a c programme for elecricity bill?

Write your program and if you are having a problem post it here with a description of the problem you are having. What you are asking is for someone to do your homework for you.


Write a programme in c to print abcdefedcba?

#include &lt;stdio.h&gt; int main (void) { puts ("abcdefedcba"); return 0; }


Write a c program to solve cos series?

Please do.


How do you solve the c programme of tree of hanoi?

It is the "Tower of Hanoi" and it is a puzzle. When you can solve the puzzle you can write the program, when you have learned enough to write simple programs. You do want to be able to write computer programs, don't you?


When was Lewis C. Lucas born?

Lewis C. Lucas was born on 1867-11-03.


Did C. S. Lewis write all the books in the Narnia series?

of course he did