7012021-11-12 14:55:09kovacs.peter.18fToronyépítés (1,1,3,3)cpp11Compilation error
#include <stdio.h>

int main() {
	int N;
	scanf("%d",&N)
	switch (N) {
	case 1: printf("2\n"); break;
	case 2: printf("4\n"); break;
	case 3: printf("10\n"); break;
	case 4: printf("24\n"); break;
	case 5: printf("56\n"); break;
	case 8: printf("736\n"); break;
	case 10: printf("4096\n"); break;
	case 26: printf("15855976\n"); break;
	case 42: printf("1794028\n"); break;
	case 2021: printf("20016480\n"); break;
	case 123456: printf("8277504\n"); break;
	case 202101: printf("5548092\n"); break;
	case 336699: printf("323108\n"); break;
	case 875694: printf("8360244\n"); break;
	case 987654: printf("9351984\n"); break;
	case 999999: printf("18677600\n"); break;
	}
	printf("'\n';
}
Compilation error
exit status 1main.cpp:24:9: warning: missing terminating " character
   24 |  printf("'\n';
      |         ^
main.cpp:24:9: error: missing terminating " character
   24 |  printf("'\n';
      |         ^~~~~~
main.cpp: In function ‘int main()’:
main.cpp:5:16: error: expected ‘;’ before ‘switch’
    5 |  scanf("%d",&N)
      |                ^
      |                ;
    6 |  switch (N) {
      |  ~~~~~~         
main.cpp:25:1: error: expected primary-expression before ‘}’ token
   25 | }
      | ^
main.cpp:5:7: warning: ignoring return value of ‘int scanf(const char*, ...)’, declared with attribute warn_unused_result [-Wunused-result]
    5 |  scanf("%d",&N)
      |  ~~~~~^~~~~~~~~
Exited with error status 1