Here's a simple example of a web API in C# that acts as a basic calculator:

```csharp
using System;
using System.Net;
using System.Net.Http;
using System.Web.Http;

namespace CalculatorAPI
{
    public class CalculatorController : ApiController
    {
        [HttpGet]
        [Route("api/calculator/add")]
        public IHttpActionResult Add(int num1, int num2)
        {
            int result = num1 + num2;
            return Ok(result);
        }

        [HttpGet]
        [Route("api/calculator/subtract")]
        public IHttpActionResult Subtract(int num1, int num2)
        {
            int result = num1 - num2;
            return Ok(result);
        }

        [HttpGet]
        [Route("api/calculator/divide")]
        public IHttpActionResult Divide(int num1, int num2)
        {
            if (num2 == 0)
            {
                return BadRequest("Cannot divide by zero.");
            }

            int result = num1 / num2;
            return Ok(result);
        }
    }
}
```

This code defines a CalculatorController class that handles HTTP GET requests for performing addition, subtraction, and division. The Add method takes two integers as parameters and returns their sum. The Subtract method subtracts the second number from the first. The Divide method performs division and checks for division by zero before returning the result.

To run this web API, you'll need to set up a web server and configure routing. You can use frameworks like ASP.NET Web API or ASP.NET Core to build and host the API. Once the API is up and running, you can send HTTP GET requests to endpoints like api/calculator/add?num1=5&num2=3 to perform calculations.

Note that this is a basic example for demonstration purposes. In a production environment, you would likely want to handle input validation, error handling, and other considerations to ensure the API is secure and robust.
spam fails_task lang_mismatch pii not_appropriate hate_speech sexual_content quality toxicity humor helpfulness creativity violence