C Program Day Month Calculation
/* Write a program to convert days into months and days. */
#include <stdio.h>
int main(void) {
int days;
printf("Enter No of Days : ");
scanf("%d",&days);
printf("\n Month = %d and Days = %d",days/30,days%30);
return 0;
}
#include <stdio.h>
int main(void) {
int days;
printf("Enter No of Days : ");
scanf("%d",&days);
printf("\n Month = %d and Days = %d",days/30,days%30);
return 0;
}
Comments
Post a Comment