This code wont doest display the answer why???/
#include <stdio.h>
#include <conio.h>
void main()
{
int opcode;
int num[2];
int result;
clrscr();
printf("Program for Addition, Subtraction, Multiplication and Division\n");
printf("Enter First Number:");
scanf("%d", &num[1]);
printf("Enter Your Choice: 1 - Add, 2 - Sub, 3 - Mul, 4 - Div: ");
scanf("%d", &opcode);
printf("Enter Second Number:");
scanf("%d", &num[2]);
switch(opcode)
{
case 1:
result = num[1] + num[2];
printf("%d + %d = %d", num[1], num[2], result);
break;
case 2:
result = num[1] - num[2];
printf("%d - %d = %d", num[1], num[2], result);
break;
case 3:
result = num[1] * num[2];
printf("%d * %d = %d", num[1], num[2], result);
break;
case 4:
result = num[1] / num[2];
printf("%d / %d = %d\n%d %% %d = %d", num[1], num[2], result, num[1], num[2], num[1] % num[2]);
break;
}
getch();
}