64 740
Assignments Done
99,3%
Successfully Done
In September 2018

Answer to Question #45387 in C for dip malo

Question #45387
Write a program in c input a year and display it lave year or not.
Expert's answer
#include <stdio.h>
int main() {
int year = 0;
printf("Please input the year to be validated\n");
scanf("%d", &year);
if ((year % 4 == 0 &&  year % 100 != 0) || $year % 400 ) {
  printf("Year is leap.\n");
} else  {
  printf("Year is not leap\n");
}
return 0;
}

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!

Comments

No comments. Be first!

Leave a comment

Ask Your question

Submit
Privacy policy Terms and Conditions