Computer Science, asked by srabanibera7, 9 months ago

write a program in java to find the the average of first 10 natural numbers

Answers

Answered by Farhanafarook
0

Explanation:

STEP 1: START

STEP 2: DEFINE n

STEP 3: SET count = 1

STEP 4: DEFINE xF, averageF

STEP 5: SET sumF = 0

STEP 6: ENTER n

STEP 7: REPEAT STEP 8 to 10 UNTIL count<=n

STEP 8: Enter xF

STEP 9: sumF += xF

SETP 10: count = count + 1

SETP 11: SET averageF = sumF/(n-1)

STEP 12: PRINT averageF

STEP 13: END

Similar questions