clang version 10.0.0
Target: x86_64-pc-windows-msvc
Thread model: posix
LLVM 10.0 is installed.
Source and AST
Source:
#include <stdio.h>
int main()
{
int n, c;
printf("Enter a number\n");
scanf("%d", &n);
if ( n == 2 )
printf("Prime number.\n");
else
{
for ( c = 2 ; c <= n - 1 ; c++ )
{
if ( n % c == 0 )
break;
}
if ( c != n )
printf("Not prime.\n");
else
printf("Prime number.\n");
}
return 0;
}
Transpile panic
Command:
Result:
Environment:
Source and AST
Source:
AST: ast.txt (file attatched)