tweeting the original sample code, it return 58
using System;
class GFG
{
static int XorAscii(String str)
{
int ans = (str[0]);
for (int i = 1; i < str.Length; i++) {
ans = (ans ^ ((str[i])));
}
return ans;
}
// Driver code
public static void Main(String[] args)
{
var str = "A 273 SPA Reception 2 1 03 0";
var crc = XorAscii(str).ToString("X2");
Console.WriteLine(str + crc);
}
}