View Code of Problem 8

#include<iostream>
#include<string>

using namespace std;

int main(){
	days[10]={287,294,286,293,293,293,293,293,294,294};
	int N;
	cin>>N;
	for(int i=0;i<N;++i){
		string code;
		cin>>code;
		int n=code[7]-'0';
		cout<<days[n]<<endl;
	}
	return 0;
}
/*
Main.cc: In function 'int main()':
Main.cc:7:2: error: 'days' was not declared in this scope
  days[10]={287,294,286,293,293,293,293,293,294,294};
  ^
*/

Double click to view unformatted code.


Back to problem 8