C Program Code Addition Of 2 Numbers

Leave a Comment
/* The Following code asks the user to enter 2 numbers & displays the added result */

#include<stdio.h>
#include<stdlib.h> //For System() function
int main()
{
int a,b;
printf("Enter 2 numbers to add!");
printf("\nEnter 1st number :");
scanf("%d", &a);
printf("\nEnter 2nd number:");
scanf("%d", &b);
printf("\nThe sum of the two number is: %d\n\n", (a+b));
system("pause");
return 0;
}

C  Program Code Addition Of 2 Numbers
C  Program Code Addition Of 2 Numbers

0 comments: