In addition to Weibo, there is also WeChat
Please pay attention
WeChat public account
Shulou
2025-01-18 Update From: SLTechnology News&Howtos shulou NAV: SLTechnology News&Howtos > Development >
Share
Shulou(Shulou.com)06/01 Report--
This article mainly introduces how to judge whether the C language is leap year related knowledge, detailed and easy to understand, simple and fast operation, has a certain reference value, I believe that everyone reading this C language how to judge whether leap year articles will be harvested, let's take a look at it.
The user enters a year to determine whether it is a leap year.
examples
#include
int main(){
int year;
printf("Enter year: ");
scanf("%d",&year);
if(year%4 == 0)
{
if( year%100 == 0)
{
//Here if the integer is 400 is leap year
if ( year%400 == 0)
printf("%d is leap year", year);
else
printf("%d is not leap year", year);
}
else
printf("%d is leap year", year );
}
else
printf("%d is not leap year", year);
return 0;
}
Run Results:
Input year: 19901990 is not a leap about "C language how to judge whether it is a leap year" The content of this article is introduced here, thank you for reading! I believe everyone has a certain understanding of the knowledge of "how to judge whether C language is leap year or not." If you still want to learn more knowledge, please pay attention to the industry information channel.
Welcome to subscribe "Shulou Technology Information " to get latest news, interesting things and hot topics in the IT industry, and controls the hottest and latest Internet news, technology news and IT industry trends.
Views: 0
*The comments in the above article only represent the author's personal views and do not represent the views and positions of this website. If you have more insights, please feel free to contribute and share.
Continue with the installation of the previous hadoop.First, install zookooper1. Decompress zookoope
"Every 5-10 years, there's a rare product, a really special, very unusual product that's the most un
© 2024 shulou.com SLNews company. All rights reserved.