WAP to find the sum of two numbers

// Program for finding the sum of two numbers //


#include<stdio.h>
#include<conio.h>
void main()
{
   int n1, n2, s;                        // Here two numbers are denoted by symbol 'n1' and 'n2' & sum by 's' //
   printf("Enter the First number\n");
   scanf("%d", &n1);
   printf("Enter the Second number\n");
   scanf("%d", &n2);
 
     s=n1+n2;                          // Here the formula for addition is used //
   printf("Sum of two numbers is: %d",s);
   getch();
}

  •    The Input and Output of this program are shown in the pictures below:


                                                                         INPUT     

           

     
                                                                     


                                                                            OUTPUT  




 
       


                                                   



Comments