Now this program is like a Number adding program using float. In this program we add a two integers in variables and output is our final answer.so we make a Number adding program and here is our code.
INPUT:
- #include<stdio.h>
- #include<conio.h>
- int main ( )
- {
- clrscr ( );
- float a,b,ans;
- printf (" enter the value of a ");
- scanf ("%f",&a");
- printf (" enter the value of b ");
- scanf ("%f",&b");
- ans=a+b;
- printf (" ans=%f", ans);
- getch ( );
- }
OUTPUT:
- enter the value of a. 2.5
- enter the value of b. 3.5
- ans = 6.000