- #include <stdio.h>
- void main()
- {
- int counter;
- printf("nEven valuesn");
- for (counter = 1; counter <= 100; counter++)
- {
- if (!(counter % 2)) // Even
- printf("%d ", counter);
- }
- printf("nOdd valuesn");
- counter = 0;
- while (counter <= 100)
- {
- counter++;
- if (counter % 2) // Odd
- printf("%d ", counter);
- }
- }