Skip to content

Commit db63719

Browse files
committed
Day1Complete
1 parent 8067bf2 commit db63719

16 files changed

+141
-0
lines changed

bin/Day1/AreaofCircle.class

0 Bytes
Binary file not shown.

bin/Day1/ArmstrongNumber.class

824 Bytes
Binary file not shown.
1005 Bytes
Binary file not shown.

bin/Day1/Vol2AreaOFCylinder.class

889 Bytes
Binary file not shown.

bin/Day1/floydTriangle.class

941 Bytes
Binary file not shown.

bin/Day1/palindromeNumber.class

780 Bytes
Binary file not shown.

bin/Day1/palindromeString.class

1.07 KB
Binary file not shown.

bin/Day1/primeNumbers.class

654 Bytes
Binary file not shown.

src/Day1/AreaofCircle.java

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,5 +11,6 @@ public static void main(String[] args) {
1111
int radius = sc.nextInt();
1212
double form = Math.PI * radius * radius;
1313
System.out.println("Area of Circle is: " + form);
14+
1415
}
1516
}

src/Day1/ArmstrongNumber.java

Lines changed: 24 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,24 @@
1+
package Day1;
2+
3+
public class ArmstrongNumber {
4+
5+
public static void main(String[] args) {
6+
7+
int n = 153;
8+
int temp = n;
9+
int r;
10+
int sum = 0;
11+
while (n > 0) {
12+
r = n % 10;
13+
n = n / 10;
14+
sum = sum + (r * r * r);
15+
System.out.println(sum);
16+
}
17+
if(temp == sum){
18+
System.out.println("Armstrong Number");
19+
}
20+
else{
21+
System.out.println("Not Armstrong Number");
22+
}
23+
}
24+
}

0 commit comments

Comments
 (0)