Symbianize Forum

Most of our features and services are available only to members, so we encourage you to login or register a new account. Registration is free, fast and simple. You only need to provide a valid email. Being a member you'll gain access to all member forums and features, post a message to ask question or provide answer, and share or find resources related to mobile phones, tablets, computers, game consoles, and multimedia.

All that and more, so what are you waiting for, click the register button and join us now! Ito ang website na ginawa ng pinoy para sa pinoy!

Perpetual Calendar using C Language

Ryanandrei

Amateur
Advanced Member
Messages
119
Reaction score
0
Points
26
Kahit tips lang pano ko makuwa. case study namin yan. gumawa nako nung una pero calendar pala nagawa ko hahaha di ko kasi alam yung pinagkaiba nung dalawa.
 
Kahit tips lang pano ko makuwa. case study namin yan. gumawa nako nung una pero calendar pala nagawa ko hahaha di ko kasi alam yung pinagkaiba nung dalawa.

Iba kasi ang style ng Perpetual Calendar sa calendar na ginagamit natin ngayon eh..which is Georgian calendar. Since sinabi mo na nakabuo ka na ng calendar (assuming that it is Georgian, of course), view this: https://www.google.com/search?q=per...2&ved=0CDEQsARqFQoTCNuguN-mpMgCFYWXlAodTEINAA

Bale dadagdagan o papalitan mo lang.
 
Eto yung code ng calendar ko
#include<stdio.h>
#include<conio.h>
main()
{
int year,day,day1,day2,sm=0;
int month(int,int);
system("cls");
printf("Enter a year: " );
scanf("%d",&year);
if (year <=0)
{
printf("Please input a (positive) number");
return(0);
}

day = (year - 1)/ 4;
day1 = (year - 1)/ 100;
day2 = (year - 1)/ 400;
sm = (year + day - day1 + day2) %7;
printf("\n\n\n\nJanuary\n\n");
sm = month(31,sm);
printf("\n\n\nFebruary\n\n");
if((year)%4 == 0)
sm = month(29,sm);
else
sm = month(28,sm);
printf("\n\n\nMarch\n\n");
sm = month(31,sm);
printf("\n\n\nApril\n\n");
sm = month(30,sm);
printf("\n\n\nMay\n\n");
sm = month(31,sm);
printf("\n\n\nJune\n\n");
sm = month(30,sm);
printf("\n\n\nJuly\n\n");
sm = month(31,sm);
printf("\n\n\nAugust\n\n");
sm = month(31,sm);
printf("\n\n\nSeptember\n\n");
sm = month(30,sm);
printf("\n\n\nOctober\n\n");
sm = month(31,sm);
printf("\n\n\nNovember\n\n");
sm = month(30,sm);
printf("\n\n\nDecember\n\n");
sm = month(31,sm);
getch();
}
int month(int c,int d)
{
int a,b,e;
printf(" Sun Mon Tue Wed Thu Fri Sat\n\n");
for(a=0;a<=d;a++)
if(a>=d)
{

for(b=1;b<=c;b++)
{
if(a%7==0)
printf("\n");
printf("%6d",b);
a++;
}
}
else
printf(" ");
e=(c+d)%7;
return(e);
}
tbh wala akong idea sa mga types ng calendar
 
Back
Top Bottom