but in which programming language C,C#,C++,java,javaScript,VB,VBScript????
Well anyways here is the trick
1.Take all numbers in an array ,array name is "array1".Take the length of array(total number of variables in an array) as 10
2.take 2 integer variable "Bignum=0" and "Smallnum=array1[1]"
3 now make a for loop form 0 to 9 like i dont know which lang u r studing but in most languages it is like (int i=0;i<10;i++)
3.inside the loop you have to write 2 if statements..
first>>>>> if ( Bignum < array1[i]) then Bignum=array1[i]
second>>>>>>if(Smallnum >array1[i]) then Smallnum==array1[i]
now in the end display the values in Bignum and Smallnum
thats it ...i mean its just for beginners
here is the program in C# language
int[] array1={14,4,2,6,7,3,6,5,23,12};
int Bignum=0,Smallnum=array1[1];
for(int i =0;i<10;i++)
{
if(Bignum
{
Bignum=array1[i];
}
if(Smallnum >array1[i])
{
Smallnum=array1[i]
}
}
Console.WriteLine("The largest number is"+Bignum);
Console.WriteLine("The Smallest number is "+Smallnum);