google407ec42f1ae5ff0e.html Write a Program to understand the use of floating point data type and arithmetic operation.
top of page

Write a Program to understand the use of floating point data type and arithmetic operation.

Write a Program to understand the use of floating point data type and arithmetic operation.

or

using Float Variable find the sum,sub,mul,div of two number


#include<stdio.h>

void main()

{

float a=50.25,b=25.50;

void main()

printf("Sum of two number is =%.2f\n",a+b);

printf("Sub of Two number is =%.2f\n",a-b);

printf("Multiply of Two number is =%.2f\n",a*b);

printf("Divide of two number is =%.2f\n",a/b);

getch();

}


or


#include<stdio.h>

void main()

{

float a=50.25,b=25.50,sum,sub,mul,div;

void main()

printf("Sum of two number is =%.2f\n",sum);

printf("Sub of Two number is =%.2f\n",sub);

printf("Multiply of Two number is =%.2f\n",mul);

printf("Divide of two number is =%.2f\n",div);

getch();

}


21 views0 comments

Recent Posts

See All
bottom of page