19. Write a program to generate first n number of Fibonacci series. #include<stdio.h> #include<conio.h> int main() { int n,a,b,c,i; a=0; b=1; printf("\nEnter value of n : "); scanf("%d",&n); printf("\nFibonacci series is\n"); printf("\n%d\t%d",a,b); for(i=1;i<=n-2;i++) { c=a+b; a=b; b=c; printf("\t%d",b); } getch(); return 0; } Sample output Previous Program Next Program
This course aims to help a person understand and know his / her purpose in life, get a positive thought pattern, gain confidence, improve behaviour, learn better communication and develop a healthy physique with morality and ethics in its core. Download Syllabus Here is the reference material for IPDC What will be covered in this course? At a glance. Facing Failures Factors affecting failures Insignificance of failures Practicing Faith Learning from legends case studies of- Sachin Tendulkar Ratan Tata Project Management Remaking Yourself Restructuring Yourself Power of Habit Being addiction free Begin with end in Mind Handling Social Media Basics of Financial Planning From House to Home Affectionate Relationships Forgive & Forget Bonding the Family Soft skills tea...
7. Write a menu driven shell script which will print the following menu and execute the given task. MENU 1) Display calendar of current month 2) Display today’s date and time 3) Display usernames those are currently logged in the system 4) Display your name at given x, y position 5) Display your terminal number 6) Exit Complete code of the program i=0 while [ $i != 6 ] do echo "Menu 1. Display calender of current Month 2. Display today's date and time 3. Display usernames of those who are currently logged in the ststem 4. Display your name at given x, y position 5. Display Terminal Number 6. Exit Choose your option and enter corresponding value" read i case "$i" in 1) calender="$(cal)" echo "Here is your Calender " echo "$calender" ;; 2) current="$(date)" ...
Comments