assignment 3 - /*Assignment3,PartA,Question2*/...

Info iconThis preview shows pages 1–2. Sign up to view the full content.

View Full Document Right Arrow Icon
/* Assignment 3, Part A, Question 2 */ #include <stdio.h> int main() { int count = 0; float num = 0, total, average; printf("This will average all of the numbers entered."); printf("\nEnter any number followed by the ENTER button."); printf("\nContinue until all desired numbers have been entered."); printf("\nTo calculate and stop the program, press F6, then ENTER."); printf("\n\nEnter a number:"); /* may wish to use 999 when averaging numbers */ { total = total + num; count++; } average = total/count; printf("The average of the numbers entered is: %4.3f\n\n", average); return(0); }
Background image of page 1

Info iconThis preview has intentionally blurred sections. Sign up to view the full version.

View Full DocumentRight Arrow Icon
/* Assignment 3, Part B, Question 2 */
Background image of page 2
This is the end of the preview. Sign up to access the rest of the document.

This document was uploaded on 01/22/2011.

Page1 / 2

assignment 3 - /*Assignment3,PartA,Question2*/...

This preview shows document pages 1 - 2. Sign up to view the full document.

View Full Document Right Arrow Icon
Ask a homework question - tutors are online