Thursday, July 22, 2010

Write a programe to to add two float digits.

//Write a programe to to add two float digits//

#include<stdio.h>
#include<conio.h>
void main ()

{
float a,b,c;
clrscr ();
printf("Enter the number\n"); //For eg. 2.5 + 2.4//
scanf("%f%f",&a,&b);
c=(float)a+b;
printf("Answere is %.2f",c); //Answer is 5.10 //
getch ();
}

No comments:

Post a Comment