编写一个控制台应用。输入x,计算并输出下列分段函数f(x)的值(保留1位小数)
当x=0时,f(x)=0
当x!=0时,f(x)=1/x;
程序如下:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace TestOne_three
{
class Program
{
static void Main(string[] args)
{
double y;