Creative Commons License Foxbond's Repo

/** (c) 2012 Michał (Foxbond) Chraniuk */
#include <iostream>

using namespace std;

int main () {
	
	
	cout << "Parzyste: ";
	for (int i=0;i<=100;i++){
		if (i == 0){
		   cout << i;
		   continue;
        }
		
		if ((i % 2) == 0){
  		   cout << "," << i;
        }
	}
	cout << ".\n";
	
	cout << "Nieparzyste: ";
	for (int i=0;i<=100;i++){
		if (i == 1){
		   cout << i;
		   continue;
        }
		
		if ((i % 2) == 1){
  		   cout << "," << i;
        }
	}
	cout << ".\n";
	
	system("pause");
	return 0;
}

> Back