我是初学者刚学习了算术运算,结合前面学的用户输入写了一段代码。- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Text;
- namespace _06算术运算
- {
- class Program
- {
- static void Main(string[] args)
- {
- Console.WriteLine("输入你的成绩语文是");
- string chinese = Console.ReadLine();
- Console.WriteLine("数学");
- string math = Console.ReadLine();
- Console.WriteLine("英语");
- string english = Console.ReadLine();
- //int chinese = 90;
- //int math = 80;
- //int english = 85;
- int sum = chinese + math + english;
- int pj = sum/3;
- Console.WriteLine("你的总成绩是{0},平均分是{1}",sum,pj);
-
- Console.ReadKey();
- }
- }
- }
复制代码 报错 怎么解决 |
|