#include "stdafx.h"
int main(int argc, char* argv[])
{
//Monthes
int m[12];
m[0]=31;
m[1]=28;
m[2]=31;
m[3]=30;
m[4]=31;
m[5]=30;
m[6]=31;
m[7]=31;
m[8]=30;
m[9]=31;
m[10]=30;
m[11]=31;
//date of today
int d;
int mon;
int y;
//The day of his birthday
int day;
int month;
//Things
int cur=0;
int saman;
//yes and no
int yn=2;
//Delay
int index=0;
int delay=0;
//starting program.
while(yn==2){
printf("Check what is the day of today ? (Day in month. Example: 4)\n");
scanf("%d", &d);
printf("Check what is the month of today ? (month in year. Example: 07)\n");
scanf("%d", &mon);
saman=mon;
printf("Check what is the year of today ? (Example: 1994)\n");
scanf("%d", &y);
if(y%4 == 0)
{m[1] = 29;
}
printf("The date is: %d.%d.%d Right ?\n If yes, Press 1, if no, press 2\n", d,mon,y);
scanf("%d", &yn);
}
printf("Thank you... Now check what is the day of your birth day (Example: 5)\n");
scanf("%d", &day);
printf("Now check what is the month of your birth day (Example: 4 [for april])\n");
scanf("%d", &month);
cur=cur+(m[mon-1]-d);
while(saman != month){
saman=saman+1;
if (saman==13){
saman=1;
}
cur = cur+(m[saman-1]);
}
cur=cur+day;
printf("You will have Birthday in %d days \n\n", cur);
while (index<=1000){
index++;
while (delay<3000000){
delay=delay+100;
}
}
printf("(c) copyright 2005 Grandioza\n");
return 0;
{
אשמח אם תתנו לי הצעות הערות ושאר הירקות.