Untitled
Anonymous
Plain Text
01/21/2025 4:38 PM
425 B
19
Indexable
Never
#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