In this article, I am going to tell you that how can you create a program to convert days into months and days in C language. It is a very basic and beginners program to create in C language.
I am assuming that you all have gone through the basics of the C language because here I am not going to explain every single word in this program. If you are new to the C language then you must refer to the basic knowledge of C language by clicking here.
Still, I will tell you some important keywords in C Language that are used in this program to convert days into months and days.
Also, read- How to Grow your YouTube Channel faster in 2021? Top 5 methods!
Arithmetic Operators In C Language:
"+" is used for Addition
"- " is used for Subtraction
"*" is used for Multiplication
"/ " is used for Division
"%" is used for Module Division
Now I will give you the program and its output down below, If you don't have any system to use the compiler on then you should consider online C Compilers that are available on the internet and are free to use on android devices too.
Also, read- What is Google AdSense New Strike Policy? All you need to know
1- Program to convert days into months and days.
#include<stdio.h>
void main()
{
int months,days;
printf("\n enter days\n");
scanf("%d", & days);
months= days/30;
days= days%30;
printf("\n months= %d days= %d",months,days);
}


0 Comments