We will ask users to enter two integers and then calculate the average by adding and then dividing the sum by 2. As we are likely to get decimal values as result so we will declare all our variables as float only.
Here is the sample code.
printf("Enter the first number ");
printf("Enter the second number ");
printf("Average of two numbers = %4.2f", avg);
This code can be modified to include more integers for average value calculation.