Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- using namespace std;
- int CZY_PARZYSTA(int a)
- {
- if (a%2==0)
- {
- return 1;
- }
- else
- {
- return 0;
- }}
- int main()
- {
- int a;
- cout << "Podaj liczbe, ktorej chcesz sprawdzic parzystosc, 1=parzysta, 0=nieparzysta " << endl;
- cout << "liczba: ";
- cin >>a;
- cout << CZY_PARZYSTA(a) << endl;
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment