Search
 
SCRIPT & CODE EXAMPLE
 

CSHARP

1180 beecrowd URI

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
using System;
using System.Collections.Generic;
using System.Linq;
namespace ConsoleApp5
{
    internal class Program
    {
        static void Main(string[] args)
        {
            var SizeOfArray=Convert.ToInt32(Console.ReadLine());
            string[] ValueOfArray = Console.ReadLine().Split(' ');
            int OneNum;
            List<int> newArr = new List<int>();
            foreach (string Value in ValueOfArray)
            {
                OneNum=Convert.ToInt32(Value);
                newArr.Add(OneNum);
            }
            int MinN=110;
            int IndexOfNumber=0;
            for(int i = 1; i <= SizeOfArray; i++)
            {
                if (MinN > newArr[i-1])
                {
                    MinN = newArr[i-1];
                    IndexOfNumber = i-1;
                }
            }
            Console.WriteLine($"Menor valor: {MinN}");
            Console.WriteLine($"Posicao: {IndexOfNumber}");
        }
    }
}
Comment

PREVIOUS NEXT
Code Example
Csharp :: how to solo squad in fortnight 
Csharp :: hive survive 
Csharp :: Read csv file into wpf C# 
Csharp :: list of vectors c# 
Csharp :: nuget package TSETMC guide 
Csharp :: c# on alt + f4 
Csharp :: remove loading bars devexpress on callback 
Csharp :: camera follow player unity 
Csharp :: optional parameter get request c# 
Csharp :: how to change argument of function in f# 
Csharp :: project camera view to texture 
Csharp :: real world example of sinleton design pattern 
Csharp :: c# datagridview select row index programmatically 
Csharp :: sortdescriptions wpf 
Csharp :: how to check if data already exists in database in c# mvc 
Csharp :: how to change font text mesh pro 
Csharp :: make first 2 words upper case c# 
Csharp :: Custom Encrypted String Type 
Csharp :: how to change something in the window using a thread wpf 
Csharp :: linqkit predicatebuilder or and nested combined predicates 
Csharp :: how download file from internet and move it to folder with c# 
Csharp :: datagridview mouse click event c# 
Csharp :: Expression And Filter 
Csharp :: c# read csv file save to database dynamically 
Csharp :: {} is this used for code blocks in c# 
Csharp :: c# .net core kendo dropdownlistfor enum 
Csharp :: unity check if swipe not tap 
Csharp :: list of countries in .net mvc 5 
Csharp :: unity play audio from particle system 
Csharp :: accord.io read .mat file 
ADD CONTENT
Topic
Content
Source link
Name
6+8 =