Write a c pgm for leap year
Answer Posted / rukmanee
#include<stdio.h>
#include<conio.h>
void main()
{
int year;
clrscr();
printf("\n enter a year:");
scanf("%d",&year);
if(year%2==0&&year%100==0&&year%400==0)
{
printf("the given year is a leap year");
}
else
{
printf("the given year is not a leap year :");
}
getch();
}
| Is This Answer Correct ? | 4 Yes | 7 No |
Post New Answer View All Answers
Who invented b language?
What are called c variables?
Write a function which takes as parameters one regular expression(only ? and * are the special characters) and a string and returns whether the string matched the regular expression.
how to build a exercise findig min number of e heap with list imlemented?
Why clrscr is used after variable declaration?
main use of recursive function a) processing speed high b) reduce program length/reduce repeated statements c) if you do not, use iterative methods like, for, while or do-while d) all the above
Which is the best website to learn c programming?
What is the maximum length of an identifier?
How are Structure passing and returning implemented by the complier?
Write a program to display all the prime nos from 1 to 1000000, your code should not take time more than a minute to display all the nos.
What is the difference between formatted&unformatted i/o functions?
What are the advantages and disadvantages of a heap?
I have seen function declarations that look like this
What are structures and unions? State differencves between them.
What is double pointer?