C#------Accepting Values from User

2021-02-05 14:14

阅读:720

标签:val   name   data   ring   format   red   bec   into   cep   

The Console class in the System namespace provides a function ReadLine() for accepting input from the user and store it into a variable.

For example,

int num;
num = Convert.ToInt32(Console.ReadLine());

The function Convert.ToInt32() converts the data entered by the user to int data type, because Console.ReadLine() accepts the data in string format.

C#------Accepting Values from User

标签:val   name   data   ring   format   red   bec   into   cep   

原文地址:https://www.cnblogs.com/ShadowDomain/p/11442070.html


评论


亲,登录后才可以留言!