diff --git a/num.c b/num.c index 1222ec7..240dfe2 100644 --- a/num.c +++ b/num.c @@ -1,7 +1,9 @@ #include +#include // added new headerfile -int main() { +void main() { int num1, num2, sum; +clrscr(); // for clearing the output screen printf("Enter the first number: "); scanf("%d", &num1); @@ -9,9 +11,9 @@ int main() { printf("Enter the second number: "); scanf("%d", &num2); - sum = num1 + num3; + sum = num1 + num2; printf("The sum of %d and %d is %d.", num1, num2, sum); - return 0; + getch(); }