题解 | #成绩输入输出#
https://www.nowcoder.com/practice/eb49750ef0de47168c21761de086d97c
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
{
string input=Console.ReadLine();
string[] score=input.Split(' ');
Console.WriteLine("score1={0},score2={1},score3={2}",score[0],score[1],score[2]);
}
}
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace ConsoleApp1
{
class Program
{
static void Main(string[] args)
{
string input=Console.ReadLine();
string[] score=input.Split(' ');
Console.WriteLine("score1={0},score2={1},score3={2}",score[0],score[1],score[2]);
}
}
}
字符操作,可能会慢一点