tehtävänä olisi tehdä ohjelma joka päättelee anetusta vuosilivusta, onko se karkausvuosi
a) if - else if - ... - else if - else -ketjulla
b) yhdellä yhdistetyllä ehdolla
a) if - else if - ... - else if - else -ketjulla
b) yhdellä yhdistetyllä ehdolla
Vastaukset 5
Vanhimmat
Program Example16;
{ This program demonstrates the IsLeapYear function }
Uses sysutils;
Var YY,MM,dd : Word;
Procedure TestYear (Y : Word);
begin
Writeln (Y,' is leap year : ',IsLeapYear(Y));
end;
Begin
DeCodeDate(Date,YY,mm,dd);
TestYear(yy);
TestYear(2000);
TestYear(1900);
TestYear(1600);
TestYear(1992);
TestYear(1995);
End.
#define EOF -1
#define stdin 0
main()
{
int x, y;
char c;
char *fmt = "%d, %l";
unsigned int z;
while (!feof()) {
c = getchar();
if (EOF == c) continue;
}
gets(&c);
printf(fmt, &c, x);
fflush(stdin);
fmt = (char *)malloc(123);
fmt = (char *)realloc(fmt, 245);
y = fmt[1000];
for (z = 10; z >=0; z--) x += z;
if (z > 0) return -1;
}
"le master coder" on todellinen guru tai jopa kuru.
if( year == 1900 ) cout
if( year == 1904 || year == 1908 || year == 1912 || year == 1916 || year == 1920 || year == 1924 || year == 1928 || year == 1932 || year == 1936 || year == 1940 || year == 1944 || year == 1948 || year == 1952 || year == 1956 || year == 1960 || year == 1964 || year == 1968 || year == 1972 || year == 1976 || year == 1980 || year == 1984 || year == 1988 || year == 1992 || year == 1996 || year == 2000 ) cout