Skip to content

Commit 8cf3302

Browse files
Merge pull request #10 from saikishore222/work-branch
Java Porgram to find a factors of a Number
2 parents 1484536 + 31a158a commit 8cf3302

File tree

4 files changed

+43
-0
lines changed

4 files changed

+43
-0
lines changed

Factors/Readme.md

Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
### Factors of a Number
2+
3+
![Files-in-repo](https://img.shields.io/github/directory-file-count/KrishGaur1354/Personal-Python-Projects)
4+
![Channel Views](https://img.shields.io/youtube/channel/views/UC1x1aok5Ji52Dw6G8_GN59Q?style=social)
5+
![YouTube Channel Subscribers](https://img.shields.io/youtube/channel/subscribers/UC1x1aok5Ji52Dw6G8_GN59Q?style=social)
6+
![Youtube Second channel subscribers](https://img.shields.io/youtube/channel/subscribers/UChVQCKleV_WKpQkPu_8nozw?style=social)
7+
![Twitter Followers](https://img.shields.io/twitter/follow/ThatOneKrish?style=social)
8+
![Github Profile](https://img.shields.io/github/followers/KrishGaur1354?style=social)
9+
10+
![Java-Projects](https://socialify.git.ci/KrishGaur1354/Java-Projects/image?font=KoHo&language=1&logo=https%3A%2F%2Fwww.pngall.com%2Fwp-content%2Fuploads%2F2016%2F05%2FJava-PNG-Clipart.png&name=1&owner=1&pattern=Circuit%20Board&theme=Dark)
11+
12+
---
13+
14+
<h3><i>Inspired by GeeksforGeeks Java code on Inheritance. Check it out <a href="https://www.geeksforgeeks.org/inheritance-in-java/?ref=lbp">here</a>.</i></h3>
15+
16+
---
17+
18+
## Connect with me
19+
<a href="https://twitter.com/ThatOneKrish">
20+
<img width="30px" src="https://www.vectorlogo.zone/logos/twitter/twitter-official.svg" />
21+
</a>&ensp;
22+
<a href="https://www.instagram.com/ThatOneKrish/">
23+
<img width="30px" src="https://www.vectorlogo.zone/logos/instagram/instagram-icon.svg" />
24+
</a>&ensp;
25+

Factors/code.png

106 KB
Loading

Factors/factors.java

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
2+
import java.util.Scanner;
3+
4+
class Factors {
5+
public static void main(String[] args) {
6+
Scanner sc=new Scanner(System.in);
7+
System.out.print("Factors of a number : ");
8+
int n;
9+
n=sc.nextInt();
10+
for(int i=1;i<=n;i++)
11+
{
12+
if(n%i==0)
13+
{
14+
System.out.println(i+"\n");
15+
}
16+
}
17+
}
18+
}

Factors/output.png

36.6 KB
Loading

0 commit comments

Comments
 (0)