![]() |
Given a start year and end year. Write a program to count number of months between given two years (both inclusive). Examples:
Approach: To solve the problem, follow the below idea:
Below is the implementation of the above approach: C++
Java
Python3
C#
Javascript
Output
Number of months between 1991 and 2023(both inclusive) is: 396 months. Time Complexity: O(1) |
Reffered: https://www.geeksforgeeks.org
Android |
Type: | Geek |
Category: | Coding |
Sub Category: | Tutorial |
Uploaded by: | Admin |
Views: | 12 |