Jutro mam poprawke egzaminu z C++ i nie umiem pobrac daty systemowej dokladnie roku.
Napisalem cos takiego ale powinno pobierac rok z daty systemowej.
#include <stdio.h>
#include <dos.h>
#include <iostream.h>
bool typ_Is_Leap_Year(int year);
int main(int argc, char *argv[])
{
char ch[5];
cout<<"The year "<<y2000<<" is leap year:"<<typ_Is_Leap_Year(y2000)<<endl;
cout<<"The year "<<y2003<<" is leap year:"<<typ_Is_Leap_Year(y2003)<<endl;
cout<<"The year "<<y2004<<" is leap year:"<<typ_Is_Leap_Year(y2004)<<endl;
int stop;
cin>>stop;
return 0;
}
bool typ_Is_Leap_Year(int year)
{
char ch[5];
if ((year%4==0) || (year%400==0 && year % 100!=0))
return true;
else
return false;
}
Jak to mozna zrobic???</cpp>