C programming

Intuit Turbotax deluxe with state 2009 (...
March 3, 2010 at 10:24:39
Specs: Windows XP, pentium 4
how to come up a c program whereas you have to input 10 numbers and the output should display the average of the highest and lowest number.



See More: C programming

Report •


#1
March 3, 2010 at 10:50:47
Start with pseudo-code:

put instructions on screen
get input
do math
...
...


=====================================
Helping others achieve escape felicity

M2


Report •

#2
March 3, 2010 at 20:58:34
how? what loop statement will i use?

Report •

#3
March 3, 2010 at 23:22:26
Your loop doesn't matter for, while, do-while, either of them will get the job done.

#include <limits.h>
....

int low = INT_MAX, 
    high = INT_MIN, 
    input, iterator = 0;

loop(required #of iterations) {

   // read your input
   // test input against lowest
   // test input against highest
}

   // output (low + high) / 2

HTH


Report •
Related Solutions


Ask Question