Program in C to add two numbers Copy

#include <stdio.h>
void main() {    

    int num1, num2, sum;
    
    printf("Enter two integers: ");
    scanf("%d %d", &num1, &num2);

    // calculating sum
    sum = number1 + number2;      
    
    printf("%d + %d = %d", num1, num2, sum);
}
import java.util.*;
public class Learner{  
 public static void main(String[] args)
 {
     Scanner sc=new Scanner(System.in);
     System.out.println("Enter two integers:");
     int num1=sc.nextInt();
     int num2=sc.nextInt();
     int sum=0;
     sum=num1+num2;
     System.out.println(sum);
 }
}

Output:

Enter two integers: 12
11
12 + 11 = 23