Kamis, 14 April 2011

Looking for a leap year in c + +

Which years are leap years divisible by 4 or 400 but not divisible by regular 100.

Use the above report if to look for it. If divisible by 4, or regular divisible by 400 and not divisible by 100, then leap years. Now We'll Find how many MANY years of prayer The fruit BETWEEN leap years entered. Use the report to for loops or Husband The One.

Note the following syntax Husband:



# include <iostream>
# include <conio.h>

int main ()
{
   int end, Additions, years;
   clrscr ();

   court <<"Enter Year End:";
   cin>> end;
   court <<"Enter the Early Years:";
   cin>> Addition;
   clrscr ();

   court <<"leap years between" <<<<end "and" <<Addition <<"is:";
   court <<endl <<endl;
   for (years = end; <years = Additions; years + +)
   {
    if ((% years 4 == 0) | |! (% years 400 == 0) & & (years% 100 = 0))
    court <<years <endl <;
    Other
    <<""; court
   }
   getch (

Tidak ada komentar:

Posting Komentar