Header Ads Widget

Breaking

Search This Blog

Saturday, September 28, 2019

Write a c program to add two decimal numbers.

1.Write a c program to add two decimal numbers.


#include<stdio.h>

int main()
{
   int a, b, sum ;

   printf("Enter two numbers:\n");
   scanf("%d%d", &a, &b);

   sum = a + b;

   printf("Sum of the numbers = %d\n", sum);

   return 0;
}

Output:


No comments:

Post a Comment