Horoscope C++ Code


Simple program about horoscope

here is the code:
//Program FUN Zodiak
//Author : Tri Sutrisno

#include <conio.h>
#include <stdio.h>
#include <iostream>
#include <stdlib.h>

using namespace std;
int main(){

int d,m,zodiak;
char a;

lagi:
system("cls");
printf(".: Horoscope  :. \n");
printf("Just for fun \n \n");

printf("Enter ur birthday date ? : \n");
scanf("%i",&d);

printf("Enter ur birthday month ? : \n");
scanf("%i",&m);


if(((d>29 && m==2) || (d>31 && m==1) || (d>31 && m==1) || (d>31 && m==3) || (d>30 && m==4) || (d>31 && m==5) || (d>30 && m==6) || (d>31 && m==7) || (d>31 && m==8) || (d>30 && m==9) || (d>31 && m==10) || (d>30 && m==11) || (d>31 && m==12) )){
zodiak =0;
}else if((d>=21 && m==3) || (d<=19 && m==4)){
zodiak = 1;
}else if(((d>=20 && m==4) || (d<=20 && m==5))){
zodiak = 2;
}else if(((d>=21 && m==5) || (d<=20 && m==6))){
zodiak = 3;
}else if(((d>=21 && m==6) || (d<=22 && m==7))){
zodiak = 4;
}else if(((d>=23 && m==7) || (d<=22 && m==8))){
zodiak = 5;
}else if(((d>=23 && m==8) || (d<=22 && m==9))){
zodiak = 6;
}else if(((d>=23 && m==9) || (d<=22 && m==10))){
zodiak = 7;
}else if(((d>=23 && m==10) || (d<=21 && m==11))){
zodiak = 8;
}else if(((d>=22 && m==11) || (d<=21 && m==12))){
zodiak = 9;
}else if(((d>=22 && m==12) || (d<=19 && m==1))){
zodiak = 10;
}else if(((d>=20 && m==1) || (d<=18 && m==2))){
zodiak = 11;
}else if(((d>=19 && m==2) || (d<=20 && m==3))){
zodiak = 12;
}else{
zodiak = 0;
}


system("cls");
switch(zodiak){
case 1:
printf(".:: Your horoscope is Aries ::. \n \n");
printf("Healt : \n decrease the consumption of meat cos u cnt afford it xD \n\n");
printf("money  : \n a dollar a day \n\n");
printf("career     : \n ROB a bank man  \n\n");
printf("love    : \nForever alone \n\n");
goto codea;
break;
case 2:
printf(".:: Your horoscope is Taurus ::. \n \n");
printf("Healt : \n Stop consumin pig !!\n\n");
printf("money  : \n dont worry ull get money not\n\n");
printf("career     : \n Drug Dealer\n\n");
printf("love    : \n Your ex is married you still fapin\n\n");
goto codea;
break;
case 3:
printf(".:: Your horoscope is Gemini ::. \n \n");
printf("Healt : \n Use a vitamin for ur brain\n\n");
printf("money  : \n your money will exaushted to buy vitamin\n\n");
printf("career     : \n u have a brain damage u cnt work\n\n");
printf("love    : \n what do you expect\n\n");
goto codea;
break;
case 4:
printf(".:: Your horoscope is Cancer ::. \n \n");
printf("Healt : \n U GET BALD \n\n");
printf("money  : \n CANCER !! \n\n");
printf("career     : \n CNT DO A LOT \n\n");
printf("love    : \n PEOPLE GET PITY ON YOU \n Move On Coy..!!  \n\n");
goto codea;
break;
case 5:
printf(".:: Your horoscope is Leo ::. \n \n");
printf("Healt :\n fckit i dnt know what to write anymore \n\n");
printf("money  :\n fckit i dnt know what to write anymore \n\n");
printf("career     :\n fckit i dnt know what to write anymore \n\n");
printf("love    :\n fckit i dnt know what to write anymore \n\n ");

goto codea;

break;
case 6:
printf(".:: Your horoscope is Virgo ::. \n\n");
printf("Healt : \nfckit i dnt know what to write anymore \n\n");
printf("money  : \nfckit i dnt know what to write anymore \n\n");
printf("career     : \nfckit i dnt know what to write anymore \n\n");
printf("love    : \nfckit i dnt know what to write anymore \n\n");
goto codea;
break;
case 7:
printf(".:: Your horoscope is Libra ::. \n \n");
printf("Healt : \nfckit i dnt know what to write anymore \n\n");
printf("money  : \nfckit i dnt know what to write anymore \n\n");
printf("career     : \nfckit i dnt know what to write anymore \n\n");
printf("love    : \nfckit i dnt know what to write anymore \n\n");
goto codea;
break;
case 8:
printf(".:: Your horoscope is Scorpio ::. \n \n");
printf("Healt :\nfckit i dnt know what to write anymore\n\n ");
printf("money  :\nfckit i dnt know what to write anymore\n\n ");
printf("career     :\nfckit i dnt know what to write anymore\n\n ");
printf("love    :\nfckit i dnt know what to write anymore ");
goto codea;
break;
case 9:
printf(".:: Your horoscope is Sagitarius ::. \n \n");
printf("Healt :\nfckit i dnt know what to write anymore\n\n");
printf("money  :\nfckit i dnt know what to write anymore\n\n");
printf("career     :\nfckit i dnt know what to write anymore\n\n");
printf("love    :\nfckit i dnt know what to write anymore\n\n");
goto codea;
break;
case 10:
printf(".:: Your horoscope is Capricons ::. \n \n");
printf("Healt :\n fckit i dnt know what to write anymore\n\n");
printf("money  :\n fckit i dnt know what to write anymore \n\n");
printf("career     :\n fckit i dnt know what to write anymore\n\n");
printf("love    :\n fckit i dnt know what to write anymore ");
goto codea;
break;
case 11:
printf(".:: Your horoscope is Aquarius ::. \n \n");
printf("Healt :\n fckit i dnt know what to write anymore\n\n");
printf("money  :\n fckit i dnt know what to write anymore \n\n");
printf("career     :\n fckit i dnt know what to write anymore \n\n");
printf("love    :\n fckit i dnt know what to write anymore.\n\n");
goto codea;
break;
case 12:
printf(".:: Your horoscope is Pisces ::. \n \n");
printf("Healt : \n fckit i dnt know what to write anymore ?\n\n");
printf("money  : \n fckit i dnt know what to write anymore\n\n");
printf("career     : \n fckit i dnt know what to write anymore ?\n\n");
printf("love    : \nfckit i dnt know what to write anymore\n\n");
goto codea;
break;
default:
printf("     Error \nSomething wrong..!! \n\n use a Valid date \n\n");
goto codea;
break;
}

codea:
cout<<"Created by Tri Sutrisno\n\n";
cout<<"Mau Ulangi Lagi...(Y/T)? : ";
cin>>a;
if(a == 'y' || a == 'Y')
{
goto lagi;
}
else{
//return(0);
exit(0);
}

}



0 komentar:

Posting Komentar