Algoritma & Metode Skripsi

header ads

Turbo C++ Programming Zodiac using Switch Case

C++ Zodiac | Diwapedia

Below is a script programming determination of the zodiac according to your date of birth using Turbo C + + switch case. You can simply copy and paste the script on borlan Turbo C + + or any similar programs.



# Include <stdio.h>void main (){

    int month;

    int date;

    printf ("ZODIAC  n");

    printf ("created by Diwapedia  n");

    printf ("IT-S1 C 2011  n  n");

    printf ("Enter your birth month as a number:");

    scanf ("% d", & month);

    switch (month)

    {

        case 1: printf (" nYou born in JANUARY  n  n");

                    printf ("Please enter your date of birth:");

                    scanf ("% d", & date);

                    switch (date)

                    {

                        case 1: case 2: case 3: case 4: case 5: case 6:

                        case 7: case 8: case 9: case 10: case 11: case 12:

                        case 13: case 14: case 15: case 16: case 17: case 18:

                        case 19: case 20:

                            printf ("You Are the Zodiac CAPRICORN  n"); break;

                        case 21: case 22: case 23: case 24: case 25: case 26:

                        case 27: case 28: case 29: case 30: case 31:

                            printf ("You Are the Zodiac AQUARIUS  n"); break;

                    }

        break;

        case 2: printf (" nYou born in FEBRUARY  n  n");

                    printf ("Please enter your date of birth:");

                    scanf ("% d", & date);

                    switch (date)

                    {

                        case 1: case 2: case 3: case 4: case 5: case 6:

                        case 7: case 8: case 9: case 10: case 11: case 12:

                        case 13: case 14: case 15: case 16: case 17: case 18:

                        case 19:

                            printf ("You Are the Zodiac AQUARIUS  n"); break;

                        case 20: case 21: case 22: case 23: case 24: case 25:

                        case 26: case 27: case 28: case 29:

                            printf ("You Are the Zodiac PISCES  n"); break;

                    }

        break;

        case 3: printf (" nYou born in MARCH  n  n");

                    printf ("Please enter your date of birth:");

                    scanf ("% d", & date);

                    switch (date)

                    {

                        case 1: case 2: case 3: case 4: case 5: case 6:

                        case 7: case 8: case 9: case 10: case 11: case 12:

                        case 13: case 14: case 15: case 16: case 17: case 18:

                        case 19: case 20:

                            printf ("You Are the Zodiac PISCES  n"); break;

                        case 21: case 22: case 23: case 24: case 25: case 26:

                        case 27: case 28: case 29: case 30: case 31:

                            printf ("You Are the Zodiac ARIES  n"); break;

                    }

        break;

        case 4: printf (" nYou born in APRIL  n  n");

                    printf ("Please enter your date of birth:");

                    scanf ("% d", & date);

                    switch (date)

                    {

                        case 1: case 2: case 3: case 4: case 5: case 6:

                        case 7: case 8: case 9: case 10: case 11: case 12:

                        case 13: case 14: case 15: case 16: case 17: case 18:

                        case 19: case 20:

                            printf ("You Are the Zodiac ARIES  n"); break;

                        case 21: case 22: case 23: case 24: case 25: case 26:

                        case 27: case 28: case 29: case 30:

                            printf ("You Are the Zodiac TAURUS  n"); break;

                    }

        break;

        case 5: printf (" nYou born in MEI  n  n");

                    printf ("Please enter your date of birth:");

                    scanf ("% d", & date);

                    switch (date)

                    {

                        case 1: case 2: case 3: case 4: case 5: case 6:

                        case 7: case 8: case 9: case 10: case 11: case 12:

                        case 13: case 14: case 15: case 16: case 17: case 18:

                        case 19: case 20:

                            printf ("You Are the Zodiac TAURUS  n"); break;

                        case 21: case 22: case 23: case 24: case 25: case 26:

                        case 27: case 28: case 29: case 30: case 31:

                            printf ("You Are the Zodiac GEMINI  n"); break;

                    }

        break;

        case 6: printf (" nYou born in JUNE  n  n");

                    printf ("Please enter your date of birth:");

                    scanf ("% d", & date);

                    switch (date)

                    {

                        case 1: case 2: case 3: case 4: case 5: case 6:

                        case 7: case 8: case 9: case 10: case 11: case 12:

                        case 13: case 14: case 15: case 16: case 17: case 18:

                        case 19: case 20: case 21:

                            printf ("You Are the Zodiac GEMINI  n"); break;

                        case 22: case 23: case 24: case 25: case 26: case 27:

                        case 28: case 29: case 30:

                            printf ("You Are the Zodiac CANCER  n"); break;

                    }

        break;

        case 7: printf (" nYou born in JULY  n  n");

                    printf ("Please enter your date of birth:");

                    scanf ("% d", & date);

                    switch (date)

                    {

                        case 1: case 2: case 3: case 4: case 5: case 6:

                        case 7: case 8: case 9: case 10: case 11: case 12:

                        case 13: case 14: case 15: case 16: case 17: case 18:

                        case 19: case 20: case 21: case 22:

                            printf ("You Are the Zodiac CANCER  n"); break;

                        case 23: case 24: case 25: case 26: case 27: case 28:

                        case 29: case 30: case 31:

                            printf ("You Are the Zodiac LEO  n"); break;

                    }

        break;

        case 8: printf (" nYou born in AUGUST  n  n");

                    printf ("Please enter your date of birth:");

                    scanf ("% d", & date);

                    switch (date)

                    {

                        case 1: case 2: case 3: case 4: case 5: case 6:

                        case 7: case 8: case 9: case 10: case 11: case 12:

                        case 13: case 14: case 15: case 16: case 17: case 18:

                        case 19: case 20: case 21: case 22: case 23:

                            printf ("You Are the Zodiac LEO  n"); break;

                        case 24: case 25: case 26: case 27: case 28: case 29:

                        case 30: case 31:

                            printf ("You Are the Zodiac VIRGO  n"); break;

                    }

        break;

        case 9: printf (" nYou born in SEPTEMBER  n  n");

                    printf ("Please enter your date of birth:");

                    scanf ("% d", & date);

                    switch (date)

                    {

                        case 1: case 2: case 3: case 4: case 5: case 6:

                        case 7: case 8: case 9: case 10: case 11: case 12:

                        case 13: case 14: case 15: case 16: case 17: case 18:

                        case 19: case 20: case 21: case 22:

                            printf ("You Are the Zodiac VIRGO  n"); break;

                        case 23: case 24: case 25: case 26: case 27: case 28:

                        case 29: case 30:

                            printf ("You Are the Zodiac LIBRA  n"); break;

                    }

        break;

        case 10: printf (" nYou born in OCTOBER  n  n");

                    printf ("Please enter your date of birth:");

                    scanf ("% d", & date);

                    switch (date)

                    {

                        case 1: case 2: case 3: case 4: case 5: case 6:

                        case 7: case 8: case 9: case 10: case 11: case 12:

                        case 13: case 14: case 15: case 16: case 17: case 18:

                        case 19: case 20: case 21: case 22: case 23:

                            printf ("You Are the Zodiac LIBRA  n"); break;

                        case 24: case 25: case 26: case 27: case 28: case 29:

                        case 30: case 31:

                            printf ("You Are the Zodiac SCORPIO  n"); break;

                    }

        break;

        case 11: printf (" nYou born in NOVEMBER  n  n");

                    printf ("Please enter your date of birth:");

                    scanf ("% d", & date);

                    switch (date)

                    {

                        case 1: case 2: case 3: case 4: case 5: case 6:

                        case 7: case 8: case 9: case 10: case 11: case 12:

                        case 13: case 14: case 15: case 16: case 17: case 18:

                        case 19: case 20: case 21: case 22:

                            printf ("You Are the Zodiac SCORPIO  n"); break;

                        case 23: case 24: case 25: case 26: case 27: case 28:

                        case 29: case 30:

                            printf ("You Are the Star sign Sagittarius  n"); break;

                    }

        break;

        case 12: printf (" nYou born in DECEMBER  n  n");

                    printf ("Please enter your date of birth:");

                    scanf ("% d", & date);

                    switch (date)

                    {

                        case 1: case 2: case 3: case 4: case 5: case 6:

                        case 7: case 8: case 9: case 10: case 11: case 12:

                        case 13: case 14: case 15: case 16: case 17: case 18:

                        case 19: case 20: case 21:

                            printf ("You Are the Star sign Sagittarius  n"); break;

                        case 22: case 23: case 24: case 25: case 26: case 27:

                        case 28: case 29: case 30: case 31:

                            printf ("You Are the Zodiac CAPRICORN  n"); break;

                    }

        break;

    }}



related article: :

contoh program zodiak turbo c++,
script program zodiak turbo C++,
turbo C++ zodiak switct case

Post a Comment

0 Comments