answersLogoWhite

0


Best Answer

#include <stdio.h>

int main()

{

int month,date;

printf("Enter the month and date of your birth in the format mm-dd:\n");

scanf("%d-%d",&month,&date);

if(month<1month>12date<1date>31) {

printf("That is not a valid date.\n");

return 1;

}

printf("Your zodiac sign is ");

switch(month) {

case 1:

if (date<20) printf("Capricorn\n");

else printf("Aquarius\n");

break;

case 2:

if (date<19) printf("Aquarius\n");

else printf("Pisces\n");

break;

case 3:

if (date<21) printf("Pisces\n");

else printf("Aries\n");

break;

case 4:

if (date<20) printf("Aries\n");

else printf("Taurus\n");

break;

case 5:

if (date<21) printf("Taurus\n");

else printf("Gemini\n");

break;

case 6:

if (date<21) printf("Gemini\n");

else printf("Cancer\n");

break;

case 7:

if (date<23) printf("Cancer\n");

else printf("Leo\n");

break;

case 8:

if (date<23) printf("Leo\n");

else printf("Virgo\n");

break;

case 9:

if (date<23) printf("Virgo\n");

else printf("Libra\n");

break;

case 10:

if (date<23) printf("Libra\n");

else printf("Scorpio\n");

break;

case 11:

if (date<22) printf("Scorpio\n");

else printf("Sagittarius\n");

break;

case 12:

if (date<22) printf("Sagittarius\n");

else printf("Capricorn\n");

break;

}

return 0;

}

User Avatar

Wiki User

13y ago
This answer is:
User Avatar

Add your answer:

Earn +20 pts
Q: Can you give me an example a program of turbo c that determine a zodiac sign?
Write your answer...
Submit
Still have questions?
magnify glass
imp
Related questions

How do you create a program that will determine if it is highest number in turbo c?

It is 32767 for data-type int, 65535 for unsigned int.


Example program arrays in turbo c plus plus?

Yes, you can use for-loop in a C program compiled by Turbo C.


What are the program of turbo pascal?

tagprice


What is name of the software in which you create program?

Turbo c3 or Turbo c4. R.P. Hammad Khan_Haider...


What are examples of turbo c?

1. Turbo C is an example of Integrated Developing Environment. 2. Turbo C has example programs, the most important is bgidemo.c


Basic parts of TURBO C program?

Editor - edits text Compiler - compiles the program Linker - links the program Debugger - helps finding bugs


How do you load a program in turbo c?

File/Open


How can you use turbo c in Window7?

With program DosBox,


Who is the founder of turbo c program?

Turbo c program is from Borland which is an integrated development environment and a computer language. Some of the parts of turbo c were incorporated from the wizard c in 1987, but it was first developed by Dennis Ritchie in 1970.


What has the author Eric P Bloom written?

Eric P. Bloom has written: 'The Turbo C++ trilogy' -- subject(s): C (Computer program language), C++ (Computer program language), Turbo C (Computer file), Turbo C++ 'Turbo C Plus Plus Trilogy' 'The C trilogy' -- subject(s): C (Computer program language)


What are the Examples of Turbo Pascal 5.5?

They are example programs written in Turbo Pascal.


Do a program with turbo pascal to print the alphabet backward?

Turbo Pascal is a style of computer programming. This type of writing language can be used to create a program that prints the alphabet backwards.