Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include "stdafx.h"
- #include <iostream>
- #include <stdint.h>
- bool isLeap ( int year )
- {
- if ( year % 4 == 0 && year % 100 != 0 )
- {
- return true;
- }
- else
- {
- return false;
- }
- }
- int main ( )
- {
- char years = 0;
- printf ( "Type the year in real numbers: " );
- scanf ( "%d", &years );
- if ( isLeap ( years ) )
- {
- printf ( "\nLeap Year\n\n" );
- }
- else
- {
- printf ( "\nNot Leap Year\n\n" );
- }
- system("PAUSE");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment