#### Let's call this one labscan.c #### Write a program that reads pairs of numbers and prints them out. #### Maybe something like this Python program. (Enter one number per line.) while True: x = int(input()) y = int(input()) print "{0}*{1} is {2}".format(x, y, x*y) #### Call your program labprint.c #### OK... Here it is. #include #include int main(int argc, char *argv[]) { while(1) { int x, y ; scanf("%d %d", &x, &y) ; printf("%4d * %4d = %8d\n", x, y, x*y) ; } return 0 ; } #### Using the fact that scanf returns the number of arguments read, #### rewrite your program to end when the "user" types EOT (aka ^D) #### Replace the call scanf("%d %d", &x, &y) with scanf("%d %d", p, q) #### Now modify your program so that it works. #### You will need to declare a couple of pointer variables. #### By the way, this is a very silly thing to do. #### Pretend you're a FORTRAN programmer and integers are "punched" in #### six digit fields (such as 000004001000). How do you handle that? #### What if they are separated by commas (such as 4,1000)?