write a python module to input total number of days and find the total number of months and remaining days after months, and display it in another program.
Answers
Answered by
7
Answer:
// C program to find the number of days in a given month
#include<stdio.h>
int main()
{
//fill the code
int year, month;
scanf("%d %d",&month,&year);
if(month == 1 || month == 3 || month == 5 || month == 7 || month == 8 || month == 10 || month == 12)
printf("Number of days is 31");
else if((month == 2) && ((year%400==0) || (year%4==0 && year%100!=0)))
{
printf("Number of days is 29");
}
else if(month == 2)
{
printf("Number of days is 28");
}
else
printf("Number of days is 30");
return 0;
}
Mark as brainliest
Similar questions