My Math Forum C programming. (basics)

 Computer Science Computer Science Forum

 December 4th, 2016, 06:18 AM #1 Member   Joined: Oct 2016 From: Slovenia, Europe Posts: 46 Thanks: 5 C programming. (basics) Please help me with my problem. I cannot find the solution. I have two different tables, a user defines their size and their elements... The second table always has less or equal elements than the first and all the elements of the second table are surely elements of first table too. My program prints both tables. For example: Code: 1st table: 1 3 5 7 9 2nd table: 5 7 My question is, how to find and print elements which are in first table but they are not in the second. It should seems like this: Code: 1st table: 1 3 5 7 9 2nd table: 5 7 in 1st table but not in the second: 1 3 9 I will be greatful if anybody helps.
 December 6th, 2016, 12:43 AM #2 Senior Member   Joined: Apr 2014 From: UK Posts: 680 Thanks: 265 for loop through the first table, each time looping through the second table, something like this: Code: `for (int t1loop = 0; t1loop

 Tags basics, programming

 Thread Tools Display Modes Linear Mode

 Similar Threads Thread Thread Starter Forum Replies Last Post mitch08 Computer Science 2 November 28th, 2015 06:51 AM Olivia Algebra 2 December 21st, 2014 02:15 PM zahlenzbinden1 Math Books 2 November 30th, 2011 03:06 AM netzweltler Applied Math 28 October 19th, 2011 10:01 AM

 Contact - Home - Forums - Top