using Microsoft.AspNetCore.Mvc; using TCC.Services; namespace TCC.Controllers { [ApiController] [Route("simulation")] public class SimulationController : ControllerBase { public SimulationController() { } [HttpGet("harmonic-progression")] public async Task GetHarmonicProgression([FromQuery] int n) { float sum = 0; for (int i = 1; i <= n; i++) { sum += 1.0f / i; } return Ok(sum); } [HttpGet("json")] public async Task GetJsonResponse() { return Ok(new { message = "Hello World!" }); } } }