I am supposed to produce a program for my computer science class that reads two integers and outputs the product, sum, etc. for the two integers. How can make it where the program reads any two integers input before the program is run? The output is supposed to look like this, with x and y being any variables typed in(we are using Cygwin):
$ ./a x y
product of x and y
sum of x and y
I am a beginner so please dumb down explanations for me if you can.
Okay, I used int main(int argc, char *argv[]). I tried to assign argv[2] to x and argv[3] to y, but when I compile the program it says assignment makes integer from pointer without cast. What does this mean and how the heck do I fix it?