using System;
using System.Collections.Generic;
using System.Linq;
using static System.Console;
namespace ConsoleApp12
{
class Program
static void Main(string[] args)
var x = new List<int>();
for (int i = 0; i < 5; i++)
x.Add(int.Parse(ReadLine()));
WriteLine("imax="+(x.IndexOf(x.Max())+1).ToString()+"; imin="+(x.IndexOf(x.Min())+1).ToString());
ReadKey();
}
Copyright © 2024 SCHOLAR.TIPS - All rights reserved.
Answers & Comments
Verified answer
using System;
using System.Collections.Generic;
using System.Linq;
using static System.Console;
namespace ConsoleApp12
{
class Program
{
static void Main(string[] args)
{
var x = new List<int>();
for (int i = 0; i < 5; i++)
x.Add(int.Parse(ReadLine()));
WriteLine("imax="+(x.IndexOf(x.Max())+1).ToString()+"; imin="+(x.IndexOf(x.Min())+1).ToString());
ReadKey();
}
}
}