Problem: I am doing an assignment that seems pretty straightforward, however, I am getting an error that says variable 'test1' is uninitialized. I declared it as an int, then initialized it in the scanf statement. any help here?
#include<stdio.h>
#include<stdlib.h>
#include<math.h>
void main()
{
int hours, hours2, test1, test2, test3, avg, well;
avg = (test1 + test2 + test3) / 3;
printf("Enter your Cprogram Test grades here for Test 1, 2, and 3: \n");
scanf("%d%d%d", &test1, &test2, &test3);
printf("The average of these grades are: %d. \n", avg);