Programming-Language-Design / input / input_lab_12.txt
input_lab_12.txt
Raw
double[10] v;

// * Main program
void main() {
	double value;
	int i,j;
	int[4][5] w;
	struct { 
		int day;
		int month, year;
	} date;
	
	read date.day; // * lvalue
	date.year = (int)'a'; 
	date.month = date.day*date.year%12+1;
	write date.day, '\n', date.month, '\n', (double)(date.year), '\n';
	
	read value;
		
	i=0;	
	while (i<10) {
		v[i]=value; // * lvalue
		write i,':',v[i], ' ';
		if (i%2)
			write 'o','d','d','\n';
		else 
			write 'e','v','e','n','\n';
		i=i+1;
	}
	write '\n';

	i=0;
	while (i<4) {
		j=0;
		while (j<5) {
			w[i][j]=i+j;
			write w[i][j], ' ';
			j=j+1;
		}
		write '\n';
		i=i+1;
	}

}