Skip to content

Instantly share code, notes, and snippets.

@DiegoCaridei
Created January 20, 2023 12:28
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
Star You must be signed in to star a gist
Embed
What would you like to do?
sum.c
#include <stdio.h>
int add(int a, int b){
return a+b;
}
int main(int argc, const char * argv[]) {
// insert code here...
int a,b;
printf("First number ");
scanf("%d",&a);
printf("Second number ");
scanf("%d",&b);
int sum = add(a, b);
printf("A plus b equals %d", sum);
return 0;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment