Skip to content

Commit

Permalink
Merge pull request #1 from sandipan08/master
Browse files Browse the repository at this point in the history
Check 1st commit
  • Loading branch information
Samrat003 authored Sep 30, 2020
2 parents e5622ae + 6e158db commit b866465
Show file tree
Hide file tree
Showing 2 changed files with 34 additions and 4 deletions.
19 changes: 15 additions & 4 deletions FiboNum.java
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;
}

}

}

19 changes: 19 additions & 0 deletions Swap_without_Third.java
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);
}

}

0 comments on commit b866465

Please sign in to comment.