what is the code of the output of print the 10 fibonacci
number series
Answers were Sorted based on User's Feedback
Answer / arun asokan
#include<stdio.h>
#include<conio.h>
void main()
{
int a=0,b=1,c,limit=8;
clrscr();
printf("%d\t%d",a,b);
for(n=1;n<=limit;n++)
{
c=a+b;
a=b;
b=c;
printf("\t%d",c);
}
getch();
}
Is This Answer Correct ? | 4 Yes | 0 No |
Answer / prassatharun
#include<stdio.h>
void main()
{
int a=0,b=1,c,limit=10,n=1;
clrscr();
printf("%d\n%d",a,b);
while(n<=limit)
{
c=a+b;
a=b;
b=c;
printf("\n%d",c);
n++;
}
getch();
}
Is This Answer Correct ? | 0 Yes | 2 No |
How can i find first 5 natural Numbers without using any loop in c language????????
what is the code of the output of print the 10 fibonacci number series
void main() { int i=i++,j=j++,k=k++; printf(ā%d%d%dā,i,j,k); }
main() { int *ptr=(int*)malloc(sizeof(int)); *ptr=4; printf("%d",(*ptr)+++*ptr++); }
Can you send Code for Run Length Encoding Of BMP Image in C Language in linux(i.e Compression and Decompression) ?
main() { char *p="GOOD"; char a[ ]="GOOD"; printf("\n sizeof(p) = %d, sizeof(*p) = %d, strlen(p) = %d", sizeof(p), sizeof(*p), strlen(p)); printf("\n sizeof(a) = %d, strlen(a) = %d", sizeof(a), strlen(a)); }
main() { float me = 1.1; double you = 1.1; if(me==you) printf("I love U"); else printf("I hate U"); }
int i; main(){ int t; for ( t=4;scanf("%d",&i)-t;printf("%d\n",i)) printf("%d--",t--); } // If the inputs are 0,1,2,3 find the o/p
how many processes will gate created execution of -------- fork(); fork(); fork(); -------- Please Explain... Thanks in advance..!
prog. to produce 1 2 3 4 5 6 7 8 9 10
Which version do you prefer of the following two, 1) printf(ā%sā,str); // or the more curt one 2) printf(str);
write a c program to Create employee record by taking details like name, employee id, address and phone number. While taking the phone number, take either landline or mobile number. Ensure that the phone numbers of the employee are unique. Also display all the details