please HELP

i cant run the c++ and i have H.W yo submet
i want someone to check if the answer is correct

this is the question
Write a C-Program that does the following
• Read integer numbers from a file inp.dat
• Calculate the sum, average, and multiplicand of even numbers and store the result and the even numbers in output file out1.dat
• Calculate the sum, average, and multiplicand of odd numbers and stored the result and the odd numbers in output file out2.dat

fprintf(outp1,"the sum=%d\n the product=%d\n and the average=%lf",even_sum,even_product,even_average); fprintf(outp2,"the sum=%d\n the product=%d\n and the average=%lf",odd_sum,odd_product,odd_average);}