I am trying to write a averaging of 10 numbers program. When I compile it, it prints nothing to the screen. I checked everything and looks to be correct! Maybe there something i am not catching. I figured it might be my computer being wacky again!?? Sometimes when I use gets, fgets or getchar, my compiler saying... "Using _____ is dangerous" and wont compile but if i save the code and restart my compiler and open it under a new file it will run. idk heres the code so far
That would be the second issue. Why is my compiler doing that??Code:#include <stdio.h> #include <string.h> int avg(void); int main(void) { int avg(void); } int avg(void) { char avg[10]; printf("Please enter a number. "); fgets(avg, sizeof(avg), stdin); printf(avg); return 0; }