Use for loop programming, input the integer n from the keyboard, then input the number n, find its average value and output. Use c language to express

Use for loop programming, input the integer n from the keyboard, then input the number n, find its average value and output. Use c language to express

# Include
Void main ()
{
int i,n,num;
Double ave =0;
Printf (" input n:");
Scanf ("% d ",& n)// Enter n
For (i=1; i

Write in C language: input two integers a and b from the keyboard, find the average value ave, and output the average value

# Include
Void main ()
{
Int a, b;
Double ave;// must be floating point
Ave =0.00;
A =0;
B=0;
Printf (" Enter two integers:');
Scanf ("% d% d ",& a,& b);
Ave=(a+b)/2;
Printf (" average:% lf ", ave);
}