Write a C language program to add two decimal numbers.


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

void main(){
int num1, num2, total=0;
printf("Enter number1: ");
scanf("%d", &num1);
printf("Enter number2: ");
scanf("%d", &num2);
total=num1+num2;
printf("Sum of two number: %d", total);

getch();
}


Input/Output: 
                       Enter number1: 3
                       Enter number2:  4
                       Sum of two number:  7

No comments

Dear Members, Thanks for Your Comments. We must be reply your comment answer as soon as possible. Please Stay with us.....

Theme images by ideabug. Powered by Blogger.