// E2E 集成测试入口
// 测试：基础运算、函数调用、条件分支、循环、字符串拼接

function main(): number {
    let x = 1 + 2;
    let y = x * 3;
    
    // 测试条件分支
    let result = y;
    if (result > 5) {
        result = result - 1;
    }
    
    // 测试循环
    let i = 0;
    while (i < 3) {
        result = result + 1;
        i = i + 1;
    }
    
    // 测试字符串拼接
    let msg = "result = " + result;
    print(msg);
    
    // 测试数值加法
    let n = 10 + 20;
    print("n = " + n);
    
    return result;
}
