HTML Tutorial || Networking Assignment || Computer Full Forms || Ms-Office Shortcut Keys || Ms-Office Notes || Number System Notes || Internet Assignment
JavaScript Tutorial || CSS Tutorial || Operating System Notes || History of Computer Assignment || Netwoking Notes || Computer Fundamentals Notes

C Program to Enter two Numbers and Find their Sum ?

Q:- Write a C Program to Enter Two Numbers and Find their Sum ?

 Input
#include<stdio.h>
#include<conio.h>
int main()
    {
         int num1,num2,sum;
         clrscr();
         printf(“Enter First Number=”);
         scanf(“%d”,&num1);
  printf(“Enter Second Number=”);
  scanf(“%d”,&num2);
  sum=num1+num2;
  printf(“Sum of %d and %d=%d”,num1,num2,sum);
  getch();
}


Output

Enter First Number=12
Enter Second Number=13
Sum of 12 and 13=25 














Comments