Skip to content

Instantly share code, notes, and snippets.

@VishalVishwakarma
Created March 2, 2017 07:34
Show Gist options
  • Save VishalVishwakarma/8091be28a9ee5e9e9154b753229c322e to your computer and use it in GitHub Desktop.
Save VishalVishwakarma/8091be28a9ee5e9e9154b753229c322e to your computer and use it in GitHub Desktop.
Basic command line input addition program in C
#include<stdio.h>
int main ()
{
int a, b, c;
printf("Enter two numbers to add\n");
scanf("%d%d",&a,&b);
c = a + b;
printf("Sum of entered numbers = %d\n",c);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment