Addition of two number

Sunday, March 13, 2016 Unknown 0 Comments


  • FIND THE ADDITION OF TWO VARIABLES


#include<stdio.h>
#include<conio.h>

void main()
{
         float a,b,c;
         clrscr();
         printf("Enter the first number:");
         scanf("%f",&a);

         printf("Enter the second number:");
         scanf("%f",&b);

         c=a+b;

         printf("Your Answer is:%f",c);
         getch();
}


OUTPUT
Enter the first number:10
Enter the second number:20
Your Answer is:30

0 comments: