Recursion is used on large problems that can be broken down into smaller, repetitive problems. It is especially implement on branches and large or complex iterative approach.
2021 PROGRAMMING LANGUAGES : You should learn this languages that will help to sustain and compatible in the year 2021. It help to boost your programming skills and fight with current technology. You will be able to think critically and with advance knowledge you can crack any coding interviews. Top 10: 10. KOTLIN Kotlin can be used for any kind of development, be it server-side, client-side web and Android. With Kotlin /Native currently in the works, support for other platforms such as embedded systems, mac-OS and iOS. 9. SWIFT Swift is a general-purpose programming language built using a modern approach to safety, performance, and software design patterns. The goal of the Swift project is to create the best available language for uses ranging from systems programming, to mobile and desktop apps, scaling up to cloud services. 8. SCALA : Scala combines object-oriented and functional progra...
Swap Two Number: Tips: 1.Take three variables. 2.Take two inputs from user. 3.Assign variables one by one each other. Code: main() { int a,b,s; printf("Enter two number two swap:\n"); scanf("%d%d",&a,&b); printf("\nyou decide:\na=%d and b=%d",a,b); getch(0); s=a; a=b; b=s; printf("\nThe swap number is: a=%d and b=%d",a,b); getch(); } Output: Please comment!
Write a C Program to Print Fibonacci series user given range using recursion , C program : Code: #include<conio.h> #include<stdio.h> void main() { int fibo(int); int n,i; printf("Enter the range of fibo:\n"); scanf("%d",&n); for(i=0;i<=n;i++) printf("%d\t",fibo(i)); getch(); } int fibo(int i) { if(i==0 || i==1) return 1; else return (fibo(i-1)+ fibo(i-2)); } Output:
Recursion is used on large problems that can be broken down into smaller, repetitive problems. It is especially implement on branches and large or complex iterative approach.
ReplyDelete