Finding maximum & minimum numbers - c# program, DOT NET Programming

Assignment Help:

Finding Maximum & Minimum Numbers - C# Program

I am facing some problems in the code for Finding Maximum & Minimum Numbers. Can anybody suggest me the proper code for it.


Related Discussions:- Finding maximum & minimum numbers - c# program

Hash table, What is a Hash Table? You can access an array using the IND...

What is a Hash Table? You can access an array using the INDEX value of that array, but how many times you know the real value of the index. The Hashtable provides a way of acce

Name the proxy file to use a web service., Mention the name of the director...

Mention the name of the directory where it is essential to locate the proxy file to use a Web service. The proxy file must be kept in the /bin directory. This directory is situ

Thread.sleep(), What is Thread.Sleep() The Thread's execution can be pa...

What is Thread.Sleep() The Thread's execution can be paused by calling Thread.Sleep method. This Thread.Sleep() method takes an integer value which  determines how long the thr

Explain MVC, Explain MVC and how it is diffrennt from Asp.net

Explain MVC and how it is diffrennt from Asp.net

Explain differences between datagrid and repeater, Differences between Data...

Differences between Datagrid, Datalist and Repeater?   1. Datagrid has paging whereas Datalist doesnt. 2. Datalist has a property called repeat. Direction = vertical/horizon

Name the control that exposes the linq features, Name the control that expo...

Name the control that exposes the LINQ features to Web developers through the ASP.NET data-source control architecture. The LinqDataSource control exposes the LINQ features to

I need paypal and urolator, I Need paypal and urolator pro api integrated i...

I Need paypal and urolator pro api integrated in to aspx site Project Description: Need paypal and urolator pro api integrated in to aspx site. The is presently completed and

What is the difference between the take and skip clauses, What is the diffe...

What is the difference between the Take and Skip clauses? The Take clause returns a specified number of elements. For instance, you can use the Take clause to return two values

What is a linqdatasource control, What is a LinqDataSource control? The...

What is a LinqDataSource control? The LinqDataSource control enables you to use LINQ. In an ASP.NET Web page by setting the properties in the markup text. You can use the contr

What is a workflow, What is a workflow? A workflow is a collection of a...

What is a workflow? A workflow is a collection of actions (called activities) that presents the model of a process. A workflow gives a way to explain the order of the execution

Aliena

2/12/2013 1:00:09 AM

This code is appropriate for you, try this..

Program:

using System;

class LargestSmallest

{

public static void Main()

{

int a,b,c,largest,smallest;    

Console.Write("Enter No 1 : ");

a = int.Parse(Console.ReadLine());    

Console.Write("Enter No 2 : ");

b = int.Parse(Console.ReadLine());    

Console.Write("Enter No 3 : ");

c = int.Parse(Console.ReadLine());    

if (a > b)

{

if(a > c)

{

largest = a;

}

else

{

largest = c;

}

}

else

{

if(c>b)

{

largest = c;

}

else

{

largest = b;

}

}  

if (a < b)

{

if(a < c)

{

smallest = a;

}

else

{

smallest = c;

}

}

else

{

if(c<b)

{

smallest = c;

}

else

{

smallest = b;

}

}  

Console.WriteLine("\n\n The Largest Number = " +largest);

Console.WriteLine("\n The Smallest Number = " +smallest);

Console.ReadLine();

}

}

Write Your Message!

Captcha
Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd