Untitled
unknown
plain_text
a year ago
425 B
5
Indexable
#include <stdio.h>
// Function to add two numbers
int sum(int a, int b) {
return a + b;
}
int main() {
int num1, num2, result;
// Input two numbers
printf("Enter first number: ");
scanf("%d", &num1);
printf("Enter second number: ");
scanf("%d", &num2);
// Call the sum function
result = sum(num1, num2);
// Print the result
printf("The sum is: %d\n", result);
return 0;
}Editor is loading...
Leave a Comment