Understand the floating point arithmetic operations Program in C
/*Write a Program to understand the floating point arithmetic operations */
#include<stdio.h>
int main(void)
{
float a=12.4,b=3.8;
printf("Sum=%.2f\n",a+b);
printf("Difference=%.2f\n",a-b);
printf("Product=%.2f\n",a*b);
printf("a/b=%.2f\n",a/b);
return 0;
}
Output:
Sum=16.20 Difference=8.60 Product=47.12 a/b=3.26c language tutorial learn c language study c language