write a program to create array of months of a year amd display all the months using for loop pls answer fast.
Answers
Answer:
Given a year N, the task is to print the calendar for every month of the given year.
Implementation:
// C program to print the month by month
// calendar for the given year
#include <stdio.h>
// Function that returns the index of the
// day for date DD/MM/YYYY
int dayNumber(int day, int month, int year)
{
static int t[] = { 0, 3, 2, 5, 0, 3,
5, 1, 4, 6, 2, 4 };
year -= month < 3;
return (year + year / 4
- year / 100
+ year / 400
+ t[month - 1] + day)
% 7;
}
// Function that returns the name of the
// month for the given month Number
// January - 0, February - 1 and so on
char* getMonthName(int monthNumber
i am solving the ques u hv typed ...pls donot confuse us. ... by posting 2 diff ques
class s1upv
{void main ()
{
string S = {january,february,march , april, may ,june, july , august, september ,october, november , december} ;
for ( int i = 0 ; i< 12 ; i++ ){ system.out.println ( S[i] ) ;
}}}