72 532
Assignments Done
Successfully Done
In April 2019

Answer to Question #36740 in C# for Payal Panjwani

Question #36740
Write a C# program that prompts the user to input three integer values and find the greatest value of the three values.
Expert's answer
using System;
using System.Linq;

class Avg
public static void Main()
int[] values = new int[3];
Console.WriteLine("Enter three integer values (each on separate line):");

for (int qp = 0; qp < values.Length; qp++)
values[qp] = int.Parse(Console.ReadLine());

Console.WriteLine("The greatest value is {0}", values.Max(value => value));

Need a fast expert's response?

Submit order

and get a quick answer at the best price

for any assignment or question with DETAILED EXPLANATIONS!


No comments. Be first!

Leave a comment

Ask Your question

Privacy policy Terms and Conditions