Write a C program that prompts the user to enter integers (positive or negative, not including 0) from the keyboard. Your program should stop reading the numbers from the keyboard when the value 0 is entered and print the range (the difference between the maximum and the minimum) of the numbers. Note that 0 is not part of the data. Comment your program liberally.
this is what i have so far
#include <stdio.h>
#include <math.h>
#include <conio.h>
int main()
int max=0, min=0, NH, r;
printf("Imput your test scores \n");
printf("Enter 0 as a test score to calculate your range \n");
scanf("%i",&NH);
do{
if (NH>max)
max=NH;
else
{
if (NH<min)
min=NH;
else
{ printf("Enter another test score\n");}
}
}while (NH!=0);
r=max-min;
printf("%i", r);
getch();
return 0;
}
getting an error message reading:
error C1075 end of the file found be4 the left brace
aka im missing a curly brace and cant igure out where.... also will this program work correctly???