-
Notifications
You must be signed in to change notification settings - Fork 3
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #1 from sandipan08/master
Check 1st commit
- Loading branch information
Showing
2 changed files
with
34 additions
and
4 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,10 +1,21 @@ | ||
import java.utill.*; | ||
class FiboNum{ | ||
public static void main(String s[]){ | ||
|
||
} | ||
Static int fibo(int n){ | ||
|
||
public static void main(String s[]){ | ||
Scanner sc=new Scanner(System.in); | ||
int n,i,t1=0,t2=1,nextitem; | ||
System.out.println("Enter the number u generate "); | ||
n=sc.nextInt(); | ||
|
||
for(i=0;i<=n;i++) | ||
{ | ||
System.out.println(t1); | ||
nextitem=t1+t2; | ||
t1=t2; | ||
t2=nextitem; | ||
} | ||
|
||
} | ||
|
||
} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,19 @@ | ||
package Basis_Program; | ||
import java.util.*; | ||
public class Swap_without_Third { | ||
|
||
public static void main(String[] args) { | ||
// TODO Auto-generated method stub | ||
Scanner sc=new Scanner(System.in); | ||
|
||
System.out.println("Enter the 2 value "); | ||
int a=sc.nextInt(); | ||
int b=sc.nextInt(); | ||
System.out.println("Value before swaping a="+a+" b="+b); | ||
a=a+b; | ||
b=a-b; | ||
a=a-b; | ||
System.out.println("Value After swaping "+a+" b="+b); | ||
} | ||
|
||
} |