F.A.Q
Hand In Hand
Online Acmers
Problem Archive
Realtime Judge Status
Authors Ranklist
 
     C/C++/Java Exams     
ACM Steps
Go to Job
Contest LiveCast
ICPC@China
Best Coder beta
VIP | STD Contests
    DIY | Web-DIY beta
Author ID 
Password 
 Register new ID

View Compilation Error

0_0_31907217_219.cpp: In function 'int main()':
0_0_31907217_219.cpp:2:64: error: expected '}' at end of input
 int main() { int day[12] = {31,0,31,30,31,30,31,31,30,31,30,31}; //每个月份各有多少天。由于2月不确定,所以暂且设为0 int year, month, date; int total = 0;  //天数  while(scanf("%d/%d/%d", &year, &month, &date) != EOF) {  if((year % 400 == 0) || ((year % 100 != 0) && (year % 4 == 0))) {  //判断输入年份是否是闰年,然后设置二月天数   day[1] = 29;           } else {   day[1] = 28;   }   int i = 0;  //月份计数  while(i < month - 1) {   total +=  day[i];   i++;  }   total += date;  printf("%d\n",total);  total = 0; } return 0;}
                                                                ^


Hangzhou Dianzi University Online Judge 3.0
Copyright © 2005-2024 HDU ACM Team. All Rights Reserved.
Designer & Developer : Wang Rongtao LinLe GaoJie GanLu
Total 0.000000(s) query 1, Server time : 2024-11-15 23:52:53, Gzip enabled