Home > Net >  C #
C #

Time:09-18

Topic 1: input the names of the 10 people, statistical name for the three words by the number of people and with the number of "strong" in the name,


Topic 2: enter a date (date format: XXXX - XX - XX), the first or the second half of the judgment belongs to, as well as the corresponding to the year is a leap year,

Question 3: to compare the string in the string class methods to complete the number 1-3000 string concatenation and using method stringBuilder class Numbers 1-3000 string concatenation, how much is each time,

CodePudding user response:

Arr=new string string [] [10].
for(int i=0; i <10; I++)
Arr=[I] the Console. ReadLine ();
Var query=arr. Where (x=& gt; X.L ength==3). The Count ();
Console. WriteLine (query);
Query=arr. Where (x=& gt; X.C ontains (" ")). The Count ();
Console. WriteLine (query);

CodePudding user response:

reference 1/f, guiyang horse Ma Shanfu plugging waterproof engineering professional maintenance of swimming pool response:
string [] arr=new string [10].
for(int i=0; i <10; I++)
Arr=[I] the Console. ReadLine ();
Var query=arr. Where (x=& gt; X.L ength==3). The Count ();
Console. WriteLine (query);
Query=arr. Where (x=& gt; X.C ontains (" ")). The Count ();
Console. WriteLine (query);

Thanks will the other two questions,
  •  Tags:  
  • C#