Write a c pgm for leap year
Answer Posted / anika
#include<iostream.h>
#include<conio.h>
void main()
{clrscr();
int y;
cout<<"enter any number ";
cin>>y;
if(y%4==0;)
cout<<"the number entered is a leap year ";
else
cout<<"it is not a leap year ";
getch();
}
| Is This Answer Correct ? | 10 Yes | 14 No |
Post New Answer View All Answers
Can a function be forced to be inline? Also, give a comparison between inline function and the C macro?
Why c is called top down?
What is the purpose of void in c?
What is the use of void pointer and null pointer in c language?
Write a program to implement queue.
Create a structure to specify data on students as given below: Roll number, Name, Department, Course, and Year of joining. Assume that there are not more than 450 students in the collage. (a) Write a function to print the names of all students who joined in the last 3 years. (b) Write a function to print the data of a student whose roll numbers are divisible by 4.
Why is it that not all header files are declared in every C program?
What are the loops in c?
Program will then find the largest of three numbers using nested if-else statements. User is prompted to enter three numbers. Program will find the largest number and display it on the screen. All three numbers entered by the user are also displayed. If user enters 21, 33, and 5, the output should be as follows: You entered: 21, 33 and 5. The largest number is 33.
What is scope rule in c?
Why doesnt that code work?
What does 1f stand for?
What is the difference between char array and char pointer?
What are external variables in c?
Why is c so powerful?