fork download
  1. #include<stdio.h>
  2. int main()
  3. {
  4. int y,n=0;
  5. for(y=1900;y<=2000;y++)
  6. {
  7. if(y%4==0&&y%100!=0||y%400==0)
  8. {
  9. printf("%6d",y);
  10. n++;
  11. if(n%3==0)
  12. printf("\n");
  13. }
  14. }
  15. return 0;
  16. }
Success #stdin #stdout 0.01s 5280KB
stdin
Standard input is empty
stdout
  1904  1908  1912
  1916  1920  1924
  1928  1932  1936
  1940  1944  1948
  1952  1956  1960
  1964  1968  1972
  1976  1980  1984
  1988  1992  1996
  2000