lab8-problem3 code

lab8-problem3 code - counter=0 sum=0 for( ) {...

Info iconThis preview shows page 1. Sign up to view the full content.

View Full Document Right Arrow Icon
Sheet1 Page 1 /* Anil Kanungo */ /* Lab 8 */ /* Problem 3 */ /* Average student grades*/ #include <stdio.h>/* Standard IO header file */ #include <conio.h> #include <math.h>/* Math header file */ int main() { int input // Will hold input from user int counter int average int numgrades int sum i
Background image of page 1
This is the end of the preview. Sign up to access the rest of the document.

Unformatted text preview: counter=0 sum=0 for( ) { printf("Enter grade: ") scanf("%d",&input) if (input == -1) { printf("================= \n") printf("Student's Average: %d \n", sum/counter) printf(" \n") printf(" \n") printf(" \n") break } sum = input + sum counter = counter + 1 } }...
View Full Document

This homework help was uploaded on 04/02/2008 for the course BME 303 taught by Professor Ren during the Spring '08 term at University of Texas.

Ask a homework question - tutors are online