当前位置:编程学习 > C#/ASP.NET >>

找错并修改

1编写程序,实现:输入一个数,求其个位数,并输出其个位数。
2哪出错了
using System;
using System.Collections.Generic;
using System.Text;

namespace ProgammingCSharp4
{
    class Program
    {
        static void Main(string[] args)
        {
            double p,s;
            int a = int.Parse(Console.ReadLine()), b = int.Parse(Console.ReadLine()), c = int.Parse(Console.ReadLine());
            if(a-b<a<a+b)
            {
                p=(a+b+c)/2
                S=√p(p-a)(p-b)(p-c);
                Console.WriteLine(s);
            }
            else
            {
                Console.WriteLine("NO");
            }
            
            } --------------------编程问答--------------------
1输入的数跟10求余
2.你自己不会运行下啊,哪报错哪就错了
--------------------编程问答-------------------- 如果是3位数

直接这样就行了

int a=i%100;


补充:.NET技术 ,  C#
CopyRight © 2012 站长网 编程知识问答 www.zzzyk.com All Rights Reserved
部份技术文章来自网络,