answersLogoWhite

0


Best Answer

/*program to calculate factorial of a number*/

#include<stdio.h>

#include<conio.h>

void main()

{

long int n;

int a=1;

clrscr();

printf("enter the number=");

scanf("%ld",&n);

while(n>0)

{

a*=n;

n--;

}

printf("the factorial is %ld",a);

getch();

}

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: 1.Write a c program for Fibonacci series?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

Write a c program Fibonacci series using for loop in java?

Exactly what do you mean by 'C program in Java'


Can you explain the program of Fibonacci series in c?

You mean you have written a program, but you don't understand it? Well, how could I explain it without seeing it?


Program to generate Fibonacci series using storage class in c plus plus?

i dn't know. haha


Write a program using while loop that generates Fabonaci series up to 200?

//to generate Fibonacci series upto a range of 200....(in C).... #include&lt;stdio.h&gt; main() { int a,b,c,i; a=0; b=1; printf("\n FIBONACCI SERIES .....\t"); i=1; while(i&lt;=(200-2)) { c=a+b; printf("\t%d",c); a=b; b=c; i++; } }


Can you have the program in C plus plus for recursive function generating a series of terms?

Yes, this can be done. For example for Fibonacci series. You will find plenty of examples if you google for the types of series you need to be generated.


Create a c plus plus program to generate Fibonacci series?

#include #include void main() { clrscr() int a=0,b=1,c,i,n; coutn cout


Program that generates and displays the Fibonacci?

/*WAP to display Fibonacci series*/ #include&lt;stdio.h&gt; #include&lt;conio.h&gt; void main() { int i,a=0,b=1,c; scanf("%d",&amp;n); printf("%d\n%d",a,b); for(i=0;i&lt;n;i++) { c=a+b; a=b; b=c; printf("\n%d",c); } getch(); }


How do you write prime number program in C language?

[ Fibonacci series___: ] #include&lt;stdio.h&gt; int main(void) { int n,i,c,a=0,b=1; printf("Enter Fibonacci series of nth term : "); scanf("%d",&amp;n); printf("%d %d ",a,b); for(i=0;i&lt;=(n-3);i++) { c=a+b; a=b; b=c; printf("%d ",c); } }


Write a C program Fibonacci using normal loops and conditional statements?

to print the Fibonacci series until 100 you can take the input in d to make it run for whatever value you want void main(){ int a,b,c,d; a=0; b=1; c=1; d=100; while(c&lt;d) { printf("%d\n",c); c=a+b; a=b; b=c; } }


What is the code of a c program that will read in a positive integer value and determine If the integer is a prime number and If the integer is a Fibonacci number?

see the program


C orogram for Fibonacci series?

#include&lt;stdio.h&gt; #include&lt;conio.h&gt; void main() { printf("The first 20numbers of Fibonacci series are:"); int a=0, b=1, c, n=2; printf("%d \t, %d", &amp;a, &amp;b); while(n&lt;20) { c=a+b; printf("\t %d", &amp;c); a=b; b=c; n++; } getch(); }


Program for sin series in c language?

find the program in c-pgms.blogspot.com