Run Code
|
API
|
Code Wall
|
Users
|
Misc
|
Feedback
|
Login
|
Theme
|
Privacy
|
Patreon
rangeofset
//Rextester.Program.Main is the entry point for your code. Don't change it. //Compiler version 4.0.30319.17929 for Microsoft (R) .NET Framework 4.5 using System; using System.Collections.Generic; using System.Linq; using System.Text.RegularExpressions; namespace Rextester { public class Program { public static void Main(string[] args) { int temp; int max = 1; int min = 1; int [] arr = { 1,2,3,4,5,6,7,8,9}; for (int i = 0;i <arr.Length;i++) { if (arr[i] > max ) { max = arr[i]; } else if (arr[i] < min) { min = arr[i]; } } Console.WriteLine(min); Console.WriteLine(max); Console.WriteLine(max-min); } } }
run
|
edit
|
history
|
help
0
Please
log in
to post a comment.
Order of Ops Decimals 5.1 (changed result.ToString(fmt2))
sdcsvdfcsc
1
Code
Hello World
Fibonachi
ingresar datos por teclado
HuyLe
Decimal Test2
extrefGenerate
Please log in to post a comment.