Skip to content

Instantly share code, notes, and snippets.

View farhanpro's full-sized avatar
:electron:
Focusing

Farhan farhanpro

:electron:
Focusing
View GitHub Profile
package com.company;
public class Main {
public static void main(String[] args) {
int b = 4;
int End_number = 20;
while (b <= End_number) {
b++;
@farhanpro
farhanpro / Main.java
Created December 22, 2018 17:55
Learned how to add the numbers from a loop
package com.company;
public class Main {
public static void main(String[] args) {
int count =0;
int sum =0;
for (int number = 1; number < 1000;number++) {
if(number%3==0&&number%5==0){
// System.out.println(number+number);
@farhanpro
farhanpro / Main.java
Created December 19, 2018 18:55
intrest rate calculator using for loop
package com.company;
public class Main {
public static void main(String[] args) {
for(int i=0;i<5;i++){
double solution = calculate_interst(10000d,i);
System.out.println("On " + i + "% it will be");
System.out.println(solution + " $");
@farhanpro
farhanpro / Main.java
Last active December 19, 2018 17:50
Written a method with the name printDayOfTheWeek that has one parameter of type int and name it day.
package com.company;
public class Main {
public static void main(String[] args) {
DayOfTheWeek(1);
DayOfTheWeek(2);
DayOfTheWeek(3);
DayOfTheWeek(4);
@farhanpro
farhanpro / Main.java
Created December 19, 2018 17:35
Daily practice
package com.company;
public class Main {
public static void main(String[] args) {
String keyword = "January";
switch (keyword){
case "January": case "Febuary": case "March": case "April": case "May": case " June": case "July":
case " August": case "September": case "October": case "November": case "December":