only the example output is given to us. Enter Month: 6 Enter Year: 1990 Enter day: 4 Zodiac Sign : Virgo Birth stone : pearl | Sololearn: Learn to code for FREE!

0

# only the example output is given to us. Enter Month: 6 Enter Year: 1990 Enter day: 4 Zodiac Sign : Virgo Birth stone : pearl

8/20/2018 12:34:58 PM

Romel Catubig

+1

int month , year, day, system.out.print("enter month") month = sc.nextInt(); system.out.print("enter year:") yeat = sc.nextInt(); system.out.print("enter day") day = sc.nextInt(); just like that. then how can i compute those inputted by the user.

+1

yes sir thats it all i need. thankyou so much sir.

0

using If else condition guys. need help from this

0

Show us your attempt by providing what you have coded so far and we will help you.

0

@Romel Catubig In case of stones using if-else here is not the best solution. They are dependent on months only afaik. I would make an array and fill the array with the names of stones. Then you just need to print out stonesArray[month-1] and you will get the answer. In case of zodiac it seems to be more complicated, as it is determined based on exact days. Perhaps, if-else is suitable here. Using if-else conditions you'll need to check the input date 12 times e.g. if ((month == 1 && day >= 20) || (month == 2 && day <= 18)) //output Aquarius else if ((month == 2 && day >= 19) || (month == 3 && day <= 20)) // output Pisces else if ... ... ... ... else // output Capricorn