Program in C to Print an Integer entered by the user

#include <stdio.h>
int main() {
  int number;

  printf("Enter an integer: ");

  // reads the user input stores in 'number'
  scanf("%d", &number);

  // print the 'number'
  printf("Integer entered by user: %d", number);

  return 0;
}
import java.util.*;
public class Learner{
  public static void main(String[] args)
  { 
   Scanner sc=new Scanner(System.in);
   int number=sc.nextInt();
  System.out.println("Enter an integer: ");
  // print the 'number'
  System.out.println("Integer entered by user:"+ number);
  }
 }

OUTPUT

Enter an integer: 40
integer entered by user:40