https://github.com/dmlloyd/openjdk
Choose one of the following options:
okay, on this occasion I will share tutorial to create an application to determine your zodiac based on date and month of birth, in this program I will create two variables, month variable and date variable, and we will make if conditioning to be able to display zodiac which match the date and month of birth that have been entered, I will use the scanner input method for this program.
import java.util.Scanner;
public class Zodiak{
public static void main(String[] args) {
int date, month;
Scanner sc = new Scanner(System.in);
System.out.println("input your date : ");
date = sc.nextInt();
System.out.println("input your mounth: ");
month = sc.nextInt();
if ((date>21 && month == 12) || (date<=19 && month== 1)){
System.out.println("your zodiac is Capricon");
}
if ((date>20 && month ==1) || (date<=18 && month == 2)){
System.out.println("your zodiac is Aquarius");
}
if ((date>19 && month == 2) || (date <=20 && month == 3)){
System.out.println("your zodiac is Pisces");
}
if ((date>21 && month == 3) || (date <=20 && month == 4)){
System.out.println("your zodiac is aries");
}
if ((date>21 && month == 4) || (date <=20 && month == 5)){
System.out.println("your zodiac is Taurus");
}
if ((date>21 && month == 5) || (date<=20 && month == 6)){
System.out.println("your zodiac is Gemini");
}
if ((date>21 && month == 6) || (date<=20 && month == 7)){
System.out.println("your zodiac is Cancer");
}
if ((date>21 && month == 7) || (date<=20 && month== 8)){
System.out.println("your zodiac is Leo");
}
if ((date>21 && month ==8) || (date<=22 && month == 9)){
System.out.println("your zodiac is Virgo");
}
if ((date>23 && month == 9) || (date<=20 && month ==10)){
System.out.println("your zodiac is Libra");
}
if ((date>21 && month == 10) || (date<=22 && month == 11)){
System.out.println("your zodiac is Scorpio");
}
if ((date>23 && month == 11) || (date<=20 && month == 12)){
System.out.println("your zodiac is Sagitarius");
}
}
}
import java.util.Scanner; we use because we use scanner input method.public class Zodiac { This is the declaration of the name of the class that you have loaded before, you must equate with the name you have created earlier.Scanner sc = new Scanner (System.in); This is the declaration of a new scanner object.System.out.println("input your date : ");
date = sc.nextInt();
System.out.println("input your month: ");
mounth = sc.nextInt();
if ((date>21 && month == 12) || (date<=19 && month== 1)){
System.out.println("your zodiac is Capricon");
above is the condition that we make that if the birth date is more than 21 and the birth month is 12 it will print the output of your Zodiac is Capricon.
if ((date>20 && month ==1) || (date<=18 && month == 2)){
System.out.println("your zodiac is Aquarius");
the condition is if the birth date is more than 20 and the month of birth is 1, and if the date of birth is less than or equal to 18 and the month of birth is 2 then it will print your zodiac is aquarius.
if ((date>19 && month == 2) || (date <=20 && month == 3)){
System.out.println("your zodiac is Pisces");
the condition of the above program part means if the birth date is more than 19 and the month of birth is 2, and if the date of birth is smaller or sam with 20 and month of birth is 3 then it will show zodiac pisces.
actually the formulas for all zodiacs are just different only on date conditioning only.
OKAY TUTORIAL IS COMPLETE, SORRY IF THERE IS A MISTAKE
Include a list of related tutorials you have already shared on Utopian that make up a Course Curriculum, if applicable.
https://gist.github.com/andilapulga/cf75412f73253a4f1706c6632881a997