1. Ask the user to enter a positive integer number (call it num1).
2. The program will add all ODD numbers in the range from 0 to num1.
3. Make another FOR loop (outside the first loop) to print all numbers in the same range that are divisible by another number entered by the user (call it num2).
Can someone help me on question 3 (from above this line). I got question 1 and 2 done, help me on question 3
Why, if you want a positive input, did you declare your number as int (line 3‑4), and why did you use %d in lines 6 and 8?
Don't declare multiple variables on the same line. The compiler might not mind, but it makes the code harder to read. Also space your code a bit; it is difficult to read with all the code squashed together.
Why are you writing all that code in main() rather than using input() and summate() functions or similar?
Please explain the logic behind the loop in line 10, which looks incorrect to me. Once you have explained that logic to yourself correctly, you should have little trouble working out part 3.
Please confirm that the ranges for your loops are inclusive.
Try to put a line end last when using printf().