Originally Posted by Salem
Now i am able to do 30% of the program.
void printcmd (void)
void firstFraction (char letter1)
int x, y, *pNum1, *pDem1;
pVar1 = &letter1;
pNum1 = &x;
pDem1 = &y;
scanf (" :%d/%d",&x, &y);
// printf( "%d/%d is %c\n", *pNum1, *pDem1, *pVar1);
void secondFraction (void)
int x, y, *pNum2, *pDem2;
char letter1, *pVar2;
pVar2 = &letter1;
pNum2 = &x;
pDem2 = &y;
scanf (" %c:%d/%d", &letter1, &x, &y);
// printf("%d/%d is %c\n", *pNum2, *pDem2, *pVar2);
void comment (void)
} while (junk != '\n');
int main (void)
printf("~~~ CALCULATOR ~~~\n");
if (first_char <= 122 && first_char >= 97)
if (first_char == 35)
}while (first_char != 'Q');
printf("\b\b~~~ GOOD BYE ~~~\n");
Now i am on the > z=x*y place.
~~~ CALCULATOR ~~~
> # testing the comment function
> # it works
> # now to test x:... fraction function
> > # it workd
> # now to test Quit cmd 'Q'
~~~ GOOD BYE ~~~
i need to make a function, where "z" can be anything entered x*y will multiply.
I dont know much about pointers. learned what are pointers yesterday .
I need help in setting variable "z" and a function for multiplying the two fractions.
My question is when i create a new function, lets say "multiply". how do i use data from other functions? like the firstFraction an secondFraction.