C Program Add Two Float Numbers After User Input
Question: Write a Program which ask user to input 2 float numbers, then calculate and print their average?// Online C compiler to run C program online
#include <stdio.h>
void main()
{
float a, b, c;
printf("Enter the two intgers");
scanf("%f %f",&a,&b);
c=(a+b)/2;
printf("avergae is %f",c);
}
Categories: c programming c programming