/*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();
}
C-A-K-E- The Series - 2013 was released on: USA: 25 December 2013 (internet)
C b a c d c b g a b b c
Beethoven's sonata No.14 in C#
http://tv.blinkx.com/show/mistresses/c-VUcimv1pwM0xLS9VLieA
c= crapi think they changed the name so that people would think the program is more proffeessoonnaall. i don't think "Crap-cleaner" sounds very professional, and might be a rouge .
Exactly what do you mean by 'C program in Java'
You mean you have written a program, but you don't understand it? Well, how could I explain it without seeing it?
i dn't know. haha
//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++; } }
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.
#include #include void main() { clrscr() int a=0,b=1,c,i,n; coutn cout
/*WAP to display Fibonacci series*/ #include<stdio.h> #include<conio.h> void main() { int i,a=0,b=1,c; scanf("%d",&n); printf("%d\n%d",a,b); for(i=0;i<n;i++) { c=a+b; a=b; b=c; printf("\n%d",c); } getch(); }
[ 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); } }
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<d) { printf("%d\n",c); c=a+b; a=b; b=c; } }
see the program
#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(); }
find the program in c-pgms.blogspot.com