C语言高手请进,急急急!!!

来源:百度知道 编辑:UC知道 时间:2024/05/25 22:09:35
#include <time.h>
#include <stdio.h>
#include <malloc.h>
#include <conio.h>
void main()
{ do{
time_t *tp;
struct tm *tmptr;
int year,mon,matrix[7][6],m,n,max,i;
tp=(time_t *)malloc(sizeof(time_t));
tmptr=(struct tm *)malloc(sizeof(struct tm));
for(m=0;m<6;m++)
for(n=0;n<7;n++)
matrix[m][n]=0;
clrscr();
printf("\nThe year must between 1970 and 2039!\nThe month must between 1 and 12!\nInput year and month\n");
printf("\nPlease input the year:");
scanf("%d",&year);
while ((year<1970||year>2039))
{
printf ("Error!The year must between 1970 and 2039!\nInput the year:");
scanf("%d",&year);
}
printf("\nPlease input the month:");
scanf("%d",&mon);
while ((mon<1||mon>12))
{
printf (&q

不好意思我看到里面有用到结构体,可是没有结构体的定义,你的程序是不是不全呀?

晕死,连程序做什么也不说,注释也没有。

这么多偷懒的人啊

是挺急的,lz补充一下问题吧,要做什么???