Language: C

unittest
{
	assert( [ "15" ].parse.expand.solve == 60 );
	assert( [ "1000000" ].parse.expand.solve == 266666333332 );
}



import std.conv;
import std.range;
import std.stdio;
import std.typecons;

void main()
{
	stdin.byLineCopy.parse.expand.solve.writeln;
}

auto parse( Range )( Range input )
if( isInputRange!Range && is( ElementType!Range == string ) )
{
	auto n = input.front.to!( long );
	return tuple( n );
}

auto solve( long n )
{
	auto ans = 0L;
	foreach( i; 1L .. n + 1 )
	{
		if( i % 3 != 0 && i % 5 != 0 ) ans += i;
	}
	return ans;
}


Compiler output:
main.c:2:1: error: expected '=', ',', ';', 'asm' or '__attribute__' before '{' token
    2 | {
      | ^
main.c:9:1: error: unknown type name 'import'
    9 | import std.conv;
      | ^~~~~~
main.c:9:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
    9 | import std.conv;
      |           ^
main.c:10:1: error: unknown type name 'import'
   10 | import std.range;
      | ^~~~~~
main.c:10:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
   10 | import std.range;
      |           ^
main.c:11:1: error: unknown type name 'import'
   11 | import std.stdio;
      | ^~~~~~
main.c:11:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
   11 | import std.stdio;
      |           ^
main.c:12:1: error: unknown type name 'import'
   12 | import std.typecons;
      | ^~~~~~
main.c:12:11: error: expected '=', ',', ';', 'asm' or '__attribute__' before '.' token
   12 | import std.typecons;
      |           ^
main.c: In function 'main':
main.c:16:9: error: 'stdin' undeclared (first use in this function)
   16 |         stdin.byLineCopy.parse.expand.solve.writeln;
      |         ^~~~~
main.c:1:1: note: 'stdin' is defined in header '<stdio.h>'; this is probably fixable by adding '#include <stdio.h>'
  +++ |+#include <stdio.h>
    1 | unittest
main.c:16:9: note: each undeclared identifier is reported only once for each function it appears in
   16 |         stdin.byLineCopy.parse.expand.solve.writeln;
      |         ^~~~~
main.c: At top level:
main.c:19:22: error: unknown type name 'Range'
   19 | auto parse( Range )( Range input )
      |                      ^~~~~
main.c:26:6: warning: function definition declared 'auto'
   26 | auto solve( long n )
      |      ^~~~~
main.c:26:6: error: return type defaults to 'int' [-Wimplicit-int]
main.c: In function 'solve':
main.c:28:14: error: type defaults to 'int' in declaration of 'ans' [-Wimplicit-int]
   28 |         auto ans = 0L;
      |              ^~~
main.c:29:9: error: implicit declaration of function 'foreach' [-Wimplicit-function-declaration]
   29 |         foreach( i; 1L .. n + 1 )
      |         ^~~~~~~
main.c:29:18: error: 'i' undeclared (first use in this function)
   29 |         foreach( i; 1L .. n + 1 )
      |                  ^
main.c:29:19: error: expected ')' before ';' token
   29 |         foreach( i; 1L .. n + 1 )
      |                ~  ^
      |                   )
main.c:29:34: error: expected ';' before '{' token
   29 |         foreach( i; 1L .. n + 1 )
      |                                  ^
      |                                  ;
   30 |         {
      |         ~