Write a c pgm for leap year
Answer Posted / narayan sharma
#include<stdio.h>
#include<conio.h>
void main()
{
int y;
clrscr();
printf("\n\n\t Enter The Year\n\n\t");
scanf("%d",&y);
if (y%100==0)
{
if (y%400==0)
printf("\n\n\t Leep Year\n\n");
else
printf("\n\n\tNot Leep\n\n\t");
}
else
{
if (y%4==0)
printf("\n\n\t Leep Year\n\n\t");
else
printf("\n\n\t Not Leep");
}
getch();
}
| Is This Answer Correct ? | 8 Yes | 2 No |
Post New Answer View All Answers
What is the heap?
How to write c functions that modify head pointer of a linked list?
What are the advantages of c language?
In this problem you are to write a program that will cut some number of prime numbers from the list of prime numbers between 1 and N.Your program will read in a number N; determine the list of prime numbers between 1 and N; and print the C*2 prime numbers from the center of the list if there are an even number of prime numbers or (C*2)-1 prime numbers from the center of the list if there are an odd number of prime numbers in the list.
Explain what are multibyte characters?
what is diffrence between linear and binary search in array respect to operators?what kind of operator can be used in both seach methods?
What is calloc malloc realloc in c?
Given two strings S1 and S2. Delete from S2 all those characters which occur in S1 also and finally create a clean S2 with the relevant characters deleted.
Explain what will the preprocessor do for a program?
How can I copy just a portion of a string?
write a c program to do the following: a) To find the area of a triangle. b) To convert the temperature from Fahrenheit to Celsius. c) To convert the time in hours : minutes : seconds to seconds.
What are enums in c?
Write the Program to reverse a string using pointers.
When is the “void” keyword used in a function?
What is structure pointer in c?