Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

take space separated input in c#

// split input string to array of strings separated by a space
string[] input = Console.ReadLine().Split(' ');
// convert each element of input to integer
int[] heights = Array.ConvertAll(input, int.Parse);
Comment

PREVIOUS NEXT
Code Example
Csharp :: how to add to a list in c# 
Csharp :: c# modify dictionary in loop 
Csharp :: how to reload app.config file at runtime in c# 
Csharp :: c# Dictionary contains key case insensitive 
Csharp :: encrypt with public key and decrypt with private key c# 
Csharp :: disabling a button if textbox is empty c# 
Csharp :: on collision unity 
Csharp :: C# compare date values 
Csharp :: c# combobox lock edit 
Csharp :: why is called c# 
Csharp :: shut game unity 
Csharp :: unity how to create a prefab 
Csharp :: same click event diffrenet buttonms c# 
Csharp :: listview imagelist c# 
Csharp :: longest substring without repeating characters leetcode 
Csharp :: ??= mean C# 
Csharp :: exceeds your upload_max_filesize ini directive (limit is 2048 KiB). 
Csharp :: select distinct two columns entity framework c# 
Csharp :: unity audio source 
Csharp :: audio unity 
Csharp :: how to add skybox in unity 
Csharp :: loading player preferences unity 
Csharp :: run in new thread C# 
Csharp :: superscript list 
Csharp :: unity inspector draw line 
Csharp :: C# top down view player movement 
Csharp :: how to make a character jump c# 
Csharp :: Convert integers to written numbers C# 
Csharp :: rename join table ef core 
Csharp :: c# while true loop 
ADD CONTENT
Topic
Content
Source link
Name
1+7 =