here we use getch() for taking input of numbers. As we know getch() take a character from the user .
But we can add only numbers which are less than 10. because getch() hold the screen untill we press a key so it can take only a character from the user.
printf(“Enter first number n”);
// taking first character
a=a–48; // 48 is the ascii of 0
printf(“Enter second numbern”);
// taking second character
b=b–48; // 48 is ascii of 0
printf(“Sum of %d and %d is %d”,a,b,a+b);
Enter first number
Enter second number
sum of 2 and 4 is 6