Advertisement
Guest User

Untitled

a guest
Jun 28th, 2017
50
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.31 KB | None | 0 0
  1. #include <iostream>
  2. using namespace std;
  3.  
  4. int main()
  5. {
  6. int luku, jakojaannos;
  7. cout << "Anna kokonaisluku:";
  8. cin >> luku;
  9.  
  10. jakojaannos = luku %= 2;
  11.  
  12. if(jakojaannos = 1) {
  13. cout << "Luku" << luku << "on parillinen.";
  14. }
  15.  
  16. else(jakojaannos = 0) {
  17. cout << "Luku" << luku << "on pariton.";
  18. }
  19. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement