主题:求助:初学者高题
using System;
using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication2
{
class Program
{
static void Main(string[] args)
{
double firstnumber, secondnumber;
string username;
Console.WriteLine("enter your name");
username = Console.ReadLine();
Console.WriteLine("welcome {0}!", username);
Console.WriteLine("Now me a number");
firstnumber=System.Convert ;To Double=(Console.ReadLine());
Console.WriteLine("Now give me anther number");
secondnumber=System.Convert ;To Double(=Console.ReadLine());
Console.WriteLine("The sum of {0} and {1} is {2}.",firstnumber,secondnumber,firstnumber+secondnumber);
Console.WriteLine("The result of subtracing {0} from{1} is{2}.",secondnumber,firstnumber, firstnumber -secondnumber);
Console.WriteLine("The product of {0} and {1} is{2}.");firstnumber:secondnumber;firstnumber*secondnumber;
Console.WriteLine("The result of dividing {0} by {1} is {2}.",firstnumber,secondnumber,firstnumber/secondnumber);
Console.WriteLine("The remainder after dividing {0} by {1} is {2}.",firstnumber,secondnumber,firstnumber%secondnumber);
}
}
}
调式有很多错误不知怎么解决..忘高手帮忙
using System.Collections.Generic;
using System.Text;
namespace ConsoleApplication2
{
class Program
{
static void Main(string[] args)
{
double firstnumber, secondnumber;
string username;
Console.WriteLine("enter your name");
username = Console.ReadLine();
Console.WriteLine("welcome {0}!", username);
Console.WriteLine("Now me a number");
firstnumber=System.Convert ;To Double=(Console.ReadLine());
Console.WriteLine("Now give me anther number");
secondnumber=System.Convert ;To Double(=Console.ReadLine());
Console.WriteLine("The sum of {0} and {1} is {2}.",firstnumber,secondnumber,firstnumber+secondnumber);
Console.WriteLine("The result of subtracing {0} from{1} is{2}.",secondnumber,firstnumber, firstnumber -secondnumber);
Console.WriteLine("The product of {0} and {1} is{2}.");firstnumber:secondnumber;firstnumber*secondnumber;
Console.WriteLine("The result of dividing {0} by {1} is {2}.",firstnumber,secondnumber,firstnumber/secondnumber);
Console.WriteLine("The remainder after dividing {0} by {1} is {2}.",firstnumber,secondnumber,firstnumber%secondnumber);
}
}
}
调式有很多错误不知怎么解决..忘高手帮忙