Skip to content

Commit b4441b6

Browse files
committed
added code
1 parent 307dc71 commit b4441b6

14 files changed

+126
-0
lines changed

bin/codeApril/Table.class

1.17 KB
Binary file not shown.

bin/coding_19/FabicoSeries.class

743 Bytes
Binary file not shown.
1.08 KB
Binary file not shown.

bin/coding_19/NumberReverse.class

1001 Bytes
Binary file not shown.

bin/coding_19/Psudo.class

571 Bytes
Binary file not shown.

bin/coding_19/RIghtNgle.class

982 Bytes
Binary file not shown.

bin/coding_19/StringReverswe.class

1.23 KB
Binary file not shown.

src/codeApril/Table.java

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
package codeApril;
2+
3+
import java.util.Scanner;
4+
5+
public class Table {
6+
7+
public static void main(String[] args) {
8+
// TODO Auto-generated method stub
9+
Scanner sc = new Scanner(System.in);
10+
System.out.println("Enter the Number: ");
11+
int num = sc.nextInt();
12+
System.out.println("*****Table of " + num + "*****");
13+
for (int i = 1; i <= 10; i++) {
14+
System.out.println(num + " * " + i + " = " + num * i);
15+
}
16+
}
17+
18+
}

src/coding_19/FabicoSeries.java

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
package coding_19;
2+
3+
public class FabicoSeries {
4+
5+
public static void main(String[] args) {
6+
// TODO Auto-generated method stub
7+
int n1 = 0, n2 = 1, sum = 0;
8+
System.out.println("n1" + " " + "n2");
9+
for (int i = 2; i <= 18; i++) {
10+
sum = n1 + n2;
11+
n1 = n2;
12+
n2 = sum;
13+
System.out.println(sum);
14+
}
15+
}
16+
}
Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
package coding_19;
2+
3+
import java.util.Scanner;
4+
5+
public class NonRepeatingCHaracter {
6+
7+
public static void main(String[] args) {
8+
Scanner sc = new Scanner(System.in);
9+
System.out.println("enter the WOrd : ");
10+
String input = sc.nextLine();
11+
for (char c : input.toCharArray()) {
12+
if (input.indexOf(c) != input.lastIndexOf(c)) {
13+
System.out.println(c);
14+
}
15+
}
16+
17+
}
18+
19+
}

src/coding_19/NumberReverse.java

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
package coding_19;
2+
3+
public class NumberReverse {
4+
5+
public static void main(String[] args) {
6+
// TODO Auto-generated method stub
7+
int num = 12321;
8+
int rev = 0;
9+
int orig = num;
10+
while (num != 0) {
11+
rev = rev * 10 + num % 10;
12+
num = num / 10;
13+
}
14+
if (orig == rev) {
15+
System.out.println(orig + "palindron");
16+
} else {
17+
System.out.println(rev + "not palindron");
18+
}
19+
20+
}
21+
22+
}

src/coding_19/Psudo.java

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
package coding_19;
2+
3+
public class Psudo {
4+
public static void main(String args[]) {
5+
System.out.println(10 + 20 + "Javatpoint");
6+
System.out.println("Javatpoint" + 10 + 20);
7+
8+
}
9+
10+
}

src/coding_19/RIghtNgle.java

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
package coding_19;
2+
3+
import java.util.Scanner;
4+
5+
public class RIghtNgle {
6+
7+
public static void main(String[] args) {
8+
// TODO Auto-generated method stub
9+
Scanner sc = new Scanner(System.in);
10+
System.out.println("enter is row : ");
11+
int row = sc.nextInt();
12+
for (int i = 1; i <= row; i++) {
13+
for (int j = 1; j <= row - i; j++) {
14+
System.out.print(" ");
15+
}
16+
for (int k = 1; k <= i; k++) {
17+
System.out.print("* ");
18+
}
19+
System.out.println(" ");
20+
}
21+
}
22+
}

src/coding_19/StringReverswe.java

Lines changed: 19 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,19 @@
1+
package coding_19;
2+
3+
public class StringReverswe {
4+
5+
public static void main(String[] args) {
6+
String input = "jahaj ";
7+
int len = input.length();
8+
String rev = "";
9+
for (int i = len - 1; i>=0; i--) {
10+
rev = rev + input.charAt(i);
11+
}
12+
if(input.equalsIgnoreCase(rev)) {
13+
System.out.println(rev+" : palindrom");
14+
}else {
15+
System.out.println(rev+" : not palindrom");
16+
}
17+
}
18+
19+
}

0 commit comments

Comments
 (0)