FIND AVERAGE OF 2 NUMBER'S
Code :
#include<stdio.h>
int main()
{
float num1, num2, avg;
printf("===========================================\n");
printf("\tAverage Of 2 numbers\n");
printf("===========================================\n");
printf("Enter values of number 1 and number 2 \n(respectively): ");
scanf("%f %f", &num1, &num2);
avg = (num1 + num2)/2;
printf("\nAverage of %.2f and %.2f is %.2f\n", num1, num2, avg);
printf("-------------------------------------------\n");
return 0;
}
Come again Learn again !
< iCode Buzz />
No comments:
Post a Comment