My Math Forum  

Go Back   My Math Forum > College Math Forum > Applied Math

Applied Math Applied Math Forum


Reply
 
LinkBack Thread Tools Display Modes
March 20th, 2017, 09:35 AM   #1
Senior Member
 
Joined: Aug 2011

Posts: 312
Thanks: 1

Largest and Smallest Decimal Number Computer program.

Can we write a computer program which will find the largest and Smallest Decimal Number in a List?

Example: 3.2,4.3,-2.1,7.3,5.4,-6.3,8.2,1.1,0.8

Thanks & Regards,
Prashant S Akerkar
prashantakerkar is offline  
 
March 20th, 2017, 09:49 AM   #2
Senior Member
 
Joined: Aug 2012

Posts: 961
Thanks: 189

Yes, that's a pretty straightforward beginning programming exercise.
Maschke is online now  
March 21st, 2017, 10:43 AM   #3
Senior Member
 
Joined: Jul 2008
From: Western Canada

Posts: 2,083
Thanks: 26

You need to define what you mean by largest and smallest. If smallest is most negative then:

In Excel:
Max( 3.2,4.3,-2.1,7.3,5.4,-6.3,8.2,1.1,0.8 )

and

Min( 3.2,4.3,-2.1,7.3,5.4,-6.3,8.2,1.1,0.8 )

If smallest means closest to zero, then it becomes marginally more complicated.
Yooklid is offline  
March 21st, 2017, 10:31 PM   #4
Senior Member
 
Joined: Aug 2011

Posts: 312
Thanks: 1

Thanks.

Output of the Computer program should be :

Largest Decimal Number : 8.2
Smallest Decimal Number : -6.3

Can this be achieved?

Thanks & Regards,
Prashant S Akerkar
prashantakerkar is offline  
Reply

  My Math Forum > College Math Forum > Applied Math

Tags
computer, decimal, largest, number, program, smallest



Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
Finding Smallest & Largest Possible Values Shamieh Calculus 2 October 22nd, 2013 10:00 AM
Find the smallest and largest value of this function dragon Calculus 1 December 12th, 2012 09:55 AM
the largest and smallest number remained Albert.Teng Algebra 0 October 7th, 2012 11:32 PM
largest set vs smallest set gurkan Applied Math 3 August 27th, 2012 04:50 PM
Largest and smallest volumes nikki1234 Calculus 7 May 3rd, 2011 03:50 PM





Copyright © 2017 My Math Forum. All rights reserved.