Looking For Anything Specific?

ads header

How to input two numbers from user and find it's sum in C Programming Language?

Write a program for add two numbers in C Programming Language? C ?

 Program 

#include<stdio.h>
#include<conio.h>
void main()
{
     int a,b,c;
    clrscr();
     printf("Enter value of a = ");
     scanf("%d",&a);
     printf("Enetr value of b = ");
     scanf("%d",&b);
    c=a+b;
    printf("Sum of numbers is = %d",c);
    getch();
}

 Output 
Enter value of a = 5
Enetr value of b = 5
Sum of numbers is = 10

Post a Comment

0 Comments