{
"input": "Please write a Python program that takes an integer as input and outputs the sum of all its digits.",
"output": "python\ndef sum_of_digits(n):\n return sum(int(digit) for digit in str(abs(n)))\n\n# Example usage:\nnumber = int(input(\"Enter an integer: \"))\nprint(f\"The sum of digits of {number} is {sum_of_digits(number)}\")\n"
}
公司名称:湖北鸿鑫农业机械有限公司
联 系 人:张总
联系电话:13085242496