Addition Of Two Numbers Entered By Users

Addition Of Two Numbers Entered By Users

Code
// C program to add numbers...(int,float...)
      
# include <stdio.h>
 int main(){
    float num1, num2 ,total; 

    printf("Enter two floating number:\n");
    scanf("%f %f",&num1,&num2);

    total=num1+num2;
    printf("Sum of two no is: %f",total);

    return 0;
 }
Output
Enter two floating number:
7
9
Sum of two no is: 16.000000

Post a Comment