#include<stdio.h>
void printFibonacci(int);
int main(){
int k,n;
long int i=0,j=1,f;
printf("Enter the range of the Fibonacci series: ");
scanf("%d",&n);
printf("Fibonacci Series: ");
printf("%d %d ",0,1);
printFibonacci(n);
return 0;
}
void printFibonacci(int n){
static long int first=0,second=1,sum;
if(n>0){
sum = first + second;
first = second;
second = sum;
printf("%ld ",sum);
printFibonacci(n-1);
}
}
Flowcharts have nothing to do with C language. Plus it is your homework.
sfafa
You mean you have written a program, but you don't understand it? Well, how could I explain it without seeing it?
#include<stdio.h> #include<conio.h> void main() { int a=-1,b=1,c=0,i,n; clrscr() printf("Enter the limit"); scanf(%d,&n) printf(the resultant fibonacci sequence is:) for(i=1;i<=n;i++) { c=a+b; printf(%d, c) a=b; b=c; } getch(); }
wefwfe
class Fibonacci { public static void main(String args[]) { System.out.println("enter the number upto u want"); int number=Integer.parseInt(args[0]); int a=0,b=1,c=0; System.out.print(a+" "+b); for(int i=1;i<=number;i++) { c=a+b; System.out.print(c+" "); a=b; b=c; } } } the number are given to the run time where are print the series eg: 5 0 1 1 2 3 5 8 13................
c the book mastering c
[ Fibonacci series___: ] #include<stdio.h> int main(void) { int n,i,c,a=0,b=1; printf("Enter Fibonacci series of nth term : "); scanf("%d",&n); printf("%d %d ",a,b); for(i=0;i<=(n-3);i++) { c=a+b; a=b; b=c; printf("%d ",c); } }
Exactly what do you mean by 'C program in Java'
//to generate Fibonacci series upto a range of 200....(in C).... #include<stdio.h> main() { int a,b,c,i; a=0; b=1; printf("\n FIBONACCI SERIES .....\t"); i=1; while(i<=(200-2)) { c=a+b; printf("\t%d",c); a=b; b=c; i++; } }
#include<stdio.h> #include<conio.h> void main() { printf("The first 20numbers of Fibonacci series are:"); int a=0, b=1, c, n=2; printf("%d \t, %d", &a, &b); while(n<20) { c=a+b; printf("\t %d", &c); a=b; b=c; n++; } getch(); }
i dn't know. haha
Look up "Flowchart" in wikepedia, most of what you need to know can be found there. Get a flow chart symbol template and a sheet of paper and you are on your way.
sfafa
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.
You mean you have written a program, but you don't understand it? Well, how could I explain it without seeing it?
#include#includevoid fibonacci(int x){int f=0,m=-1,n=1,i=0;while(i
find the program in c-pgms.blogspot.com