Reply
Old 03-06-2014, 07:07 AM   #1 (permalink)
 
Status: Junior Member
Posts: 4



Default simple c program to find min, max, average etc

I'm trying to create a simple C program that reads numbers from a file, calculates the min, max, average, and standard deviation. The standard output information should be in a function named ShowHeader(). Which you should pass a pointer to. I've been working on this for awhile with no real progress. I have never programmed before, except a small amount of java. Any tips or direction from you genius coders would be much appreciated! Thank you for reading this!!
The numbers in the files look like the following fragment:
0.848249
1.159653
1.609093
2.006033
2.203653
2.141166
2.032053
2.264230
2.230114
1.768615
1.693029
1.490851
1.207511
0.923039
0.446672
-0.113576
I forgot that the filename with the numbers must be entered in by the user.

Moodog is offline   Reply With Quote
Old 03-06-2014, 07:07 AM   #2 (permalink)
 
Status: Senior Member
Posts: 2,787



Default simple c program to find min, max, average etc

You should start by just creating a simple C program that reads numbers from a file and prints them out.

You can use fscanf() to read the numbers from the file.
EddieJ is offline   Reply With Quote
more..

Reply

Bookmarks

Thread Tools
Display Modes


Similar Threads
Thread Thread Starter Forum Replies Last Post
A simple java program to find the average of two numbers.? Craige Coding 2 05-16-2014 06:06 PM
HOW TO WRITE A SIMPLE BASIC PROGRAM TO FIND THE AVERAGE OF TEN SCORES WHICH ARE 1, 5, 10, 15, 8, 9, 2, 7, 3, 4? Barbara Programming 3 03-12-2014 11:06 AM
write a simple program,using cplusplus that will take five names and five scores and also find the average? kennethn Programming 0 02-05-2014 07:06 AM
write a simple program,using java that will take five names and five scores and also find the average? kennethn Programming 0 02-05-2014 07:06 AM
C program to find average of numbers ABOVE a certain value Certmeseeaf Programming 0 08-13-2011 01:06 PM