Monday, 6 April 2015

C Program to find out the average of two numbers

write a C Program to find out the average of two numbers


/*Program to find out the average of two numbers*/

/*author:sai       date:6-4-2015 */

#include<stdio.h>

int main()

{

 int a,b;

 float c;

 printf("Enter Two numbers ");

 scanf("%d%d",&a,&b);

 c=(a+b)/2;

 printf("Average is = %f\n",c);

}

No comments:

Post a Comment