Responsi algo


import java.util.Scanner;
public class  Zodiak
{
public static void main (String args[])
{
int tgl, bln, zodi, jan, feb, mar, apr, mei, jun, jul, ags, sep, okt, nov, des;
jan=1;
feb=2;
mar=3;
apr=4;
mei=5;
jun=6;
jul=7;
ags=8;
sep=9;
okt=10;
nov=11;
des=12;
Scanner input = new Scanner (System.in);
System.out.println ("MASUKAN DENGAN DIGIT ANGKA  \n\n\n");
System.out.print(" Masukan Tanggal lahir =  ");
tgl= input.nextInt();
System.out.print(" Masukan Bulan lahir   =  ");
bln= input.nextInt();
zodi= tgl&bln;
if ((tgl>=21)&&(bln== des)||(tgl<=19)&&(bln== jan))
System.out.println ("Zodiak Anda = capricorn");
else if ((tgl>=20)&&(bln==jan)||(tgl<=18)&&(bln==feb))
System.out.println ("Zodiak Anda = Aquarius");
else if ((tgl>=19)&&(bln==feb)||(tgl<=20)&&(bln==mar))
System.out.println ("Zodiak Anda = Pisces");
else if ((tgl>=21)&&(bln==mar)||(tgl<=20)&&(bln==apr))
System.out.println ("Zodiak Anda Aries");
else if ((tgl<=20)&&(bln==apr)||(tgl>=21)&&(bln==apr))
System.out.println ("Zodiak Anda Aries");
else if ((tgl<=20)&&(bln==mei)||(tgl>=21)&&(bln==mei))
System.out.println ("Zodiak Anda = Taurus");
else if ((tgl<=20)&&(bln==jun)||(tgl>=21)&&(bln==jun))
System.out.println ("Zodiak Anda = Gemini");
else if ((tgl<=20)&&(bln==jul)||(tgl>=21)&&(bln==jul))
System.out.println ("Zodiak Anda = Cancer");
else if ((tgl<=21)&&(bln==ags)||(tgl>=22)&&(bln==ags))
System.out.println ("Zodiak Anda Leo");
else if ((tgl<=22)&&(bln==sep)||(tgl>=23)&&(bln==sep))
System.out.println ("Zodiak Anda = Virgo");
else if ((tgl<=22)&&(bln==okt)||(tgl>=23)&&(bln==okt))
System.out.println ("Zodiak Anda = Libra");
else if ((tgl<=22)&&(bln==nov)||(tgl>=23)&&(bln==nov))
System.out.println ("Zodiak Anda = Scorpio");
else if ((tgl<=22)&&(bln==des))
System.out.println ("Zodiak Anda = Sagitarius");
else
System.out.println ("Anda salah memasukan tanggal dan Bulan lahir");

}
}
    Blogger Comment
    Facebook Comment

0 komentar:

Post a comment

Thanks For Your Feedback.