Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- namespace StringTest
- {
- class Program
- {
- static void Main(string[] args)
- {
- Console.WriteLine(LowestTemp("32 53 23 10 57"));
- Console.ReadLine();
- }
- static int LowestTemp(string temps)
- {
- var tempsArray = temps.Split(' ');
- int[] tempsToIntArray = new int[tempsArray.Length];
- for (int i = 0; i < tempsArray.Length; i++)
- {
- tempsToIntArray[i] = int.Parse(tempsArray[i]);
- }
- int lowestTemp = tempsToIntArray.Min();
- return lowestTemp;
- }
- }
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement