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

Is it good to distribute implementation to remoting client?, It's never tol...

It's never told  to distribute complete implementation at client, due to following shown  reasons:- 1) Anyone can use ILDASM and decrypt your logic. 2) It is a bad architectu

Difference between datagrid, What's difference between Datagrid, Datalist a...

What's difference between Datagrid, Datalist and repeater? The Datalist ,Datagrid, and Repeater are all ASP.NET data Web controls. They have many things in common such as Da

Different types of triggers in sql, What are the different types of trigger...

What are the different types of triggers in SQl There are 2 types of triggers in the SQL server 2000 :- 1) INSTEAD OF triggers: The INSTEAD OF triggers fire in place of

Briefly explain how server form post-back works, Briefly explain how server...

Briefly explain how server form post-back works ?  Post Back: The process in which a Web page sends data back to the similar page on the server. View State : View State i

Accepting a list of 5 items - c# program, Accepting a List of 5 Items - C# ...

Accepting a List of 5 Items - C# Program Hello, I've been trying so many codes for this but those codes didn't work well. Please write the code for Accepting a List of 5 Items

Array list, What is Array List? An Array is whose size can increase or ...

What is Array List? An Array is whose size can increase or decrease dynamically. The Array list can hold item of various types. As Array list can increase and decrease his size

Explain compare validator and range validator, Explain Compare Validator an...

Explain Compare Validator and Range Validator Compare Validator uses Control To Validate, Control To Compare and operator properties to compare a control's value with another

What happens when aspx page is requested from browser ?, The steps that occ...

The steps that occur when we request a ASPX page are as follows:- 1) The browser sends the request to the webserver. Now  assume that the webserver at the other end is IIS. 2

What is the difference between vb.net and c#?, Difference between VB.NET an...

Difference between VB.NET and C# This is the main debatable issue in .NET community and everyone treat their languages like religion. It is a very important matter which lan

Postfix expression, how to write a postfix expression calculator program us...

how to write a postfix expression calculator program using c#

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