Code Example
#include <stdio.h>
int main() {
int first;
int second;
printf("Enter two numbers: ");
scanf("%d %d", &first, &second);
printf("Sum = %d\n", first + second);
return 0;
}
Expected Output
Enter two numbers: 10 15
Sum = 25
Practice Steps
- Open the C compiler and paste the code.
- Run it, then enter two integers in the terminal.
- Change the formula to practice subtraction, multiplication, or division.