This Programs is a Simple Calculator that usses Arrays and pointers.
Currently a freshman student and im completely lost on the errors i keep on getting
#include<stdio.h>
#include <conio.h>
main()
{
clrscr();
int num1[5],num2[5],sum[5],*n1,*n2,x;
char oper[4],*o;
*n1 =num1[5];
*n2 =num2[5]
*o = oper[4];
oper[0] ='*';
oper[1] ='+';
oper[2] ='-';
oper[3] ='/';
gotoxy(3,1);printf("_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ");
gotoxy(3,2);printf("");
gotoxy(3,4);printf(" _____ _____ _____ = _____ ");
gotoxy(3,6);printf(" _____ _____ _____ = _____ ");
gotoxy(3,8);printf(" _____ _____ _____ = _____ ");
gotoxy(3,10);printf(" _____ _____ _____ = _____ ");
gotoxy(3,12);printf(" _____ _____ _____ = _____ ");
gotoxy(3,19);printf("_ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ _ ");
{
{
x = 4;
if(*o=='+');
gotoxy(3,x);printf("%d\t%c\t%d\t%d",*n1,*o,*n2,sum);
sum =*n1 + *n2;
if(*o=='/');
gotoxy(3,x);printf("%d\t%c\t%d\t%d",*n1,*o,*n2,sum);
sum =*n1 / *n2;
if(*o=='*');
gotoxy(3,x);printf("%d\t%c\t%d\t%d",*n1,*o,*n2,sum);
sum =*n1 * *n2;
if(*o=='-');
gotoxy(3,x);printf("%d\t%c\t%d\t%d",*n1,*o,*n2,sum);
sum =*n1 - *n2;
if(*o=='+');
*n1++;
*n2++;
x++;
else();
printf("\n\nERROR");
}
getch();
return 0;
}
}