This code tells us about our birthstone or zodiac sign, many of us don’t know what is our zodiac sign or even what is our birthstone. Birthstone is a gemstone that represents a person’s birth month, and zodiac is an area of the sky centred upon the ecliptic.

There are 12 types of zodiac signs and birthstones, and this code helps the users to know what are their zodiac sign and birthstone by just giving their date of birth and month of birth as input and the code finds out the rest.

The code starts with including of the header files, that is, ‘stdio.h’ and ‘conio.h’.

After including the header files the code enters the main function where the code asks the user to enter his/her date of birth and then birth month number and the information is stored in the variables ‘date’ and ‘ch’.

Then the code enters the main process where it checks the information given by the user with the information stored in the code and accordingly gives the output.

If conditions is given a range and it checks if the date of birth lies within that range and also if the month of birth is equal to the months in that range.

For example: if the user enters as date of birth as ‘19th’ and month of birth as ‘10’ ,  that is, October then it will check with all the given if condition and as one of them will satisfy so it will give an output saying “you are an LIBRA and your birthstone is CHRYSOLITE”. The birthstone is also displayed with the same given piece of information.

Thus ends our code and the user will get the desired output, the code is simple to understand all it needs is conditions about the zodiac sign and birthstone and if you understand those conditions the logic of the program becomes really simple. Download: C Program: Knowing your Zodiac Sign and Birthstone

LEAVE A REPLY

Please enter your comment!
Please enter your name here