File tree Expand file tree Collapse file tree 4 files changed +43
-0
lines changed
Expand file tree Collapse file tree 4 files changed +43
-0
lines changed Original file line number Diff line number Diff line change 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+
Original file line number Diff line number Diff line change 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+ }
You can’t perform that action at this time.
0 commit comments