C programming Program to print the Fibonacci series up to n numbers.
Program to print the Fibonacci series up to n numbers. Write its pseudo code.Use a for loop.kindly provide a programme using c. Algorithm: step1:start step2:declare a,b,c,n,i step3:initialise a=0,b=1 step4:display enter the limit step5:read n step6:display a,b step7:swap the values,a=b,b=c step8:calculate c=a+b step9:displayc step10:update I to I+1 step11:checkwhether(I<=n) if true go to step7 else go to step12 step12:stop
- 3792 Views
- 1 Answers
1 Answers
-
-
- 19 Jul
- 0 Comment
-
- How will you print numbers from 1 to 100 without using loop?
- Write a program to store 5 elements in the array P and 3 elements in the array Q.Produce a third array R after joining the array P and Q.Display the resultant array.
- What is C used for? Explain your answer
- Write a program to read the marks of 50 students in a class and display the following:
- Is C++ better than C? Explalain your answer
- Ищу достойного мужчину!
- How will you print “Hello World” without semicolon?
- Why C language is introduced? Explain your answer
- What does a person require to opt C programming as a career?
- Difference between ++*p, *p++ and *++p
Practice Mock Test
c programming
div#include<stdio.h>/divdiv#include<conio.h>/divdivvoid main()/divdiv{/divdivint a=0,b=1,c,n,i;/divdivclrscr();/divdivprintf("enter the limit\n");/divdivscanf("%d",&n);/divdivfor(i=2;i<n;i++)/divdiv{/divdivc=a+b;/divdiva=b;/divdivb=c;/divdivprintf("%d\t",c);/divdiv}/divdivgetch();/divdiv}/div