Advertisement
golovanovd

prog_lab_1.3

Feb 6th, 2016
60
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C 0.21 KB | None | 0 0
  1. #include <stdio.h>
  2. int main(void) {
  3.     int n, x;
  4.     printf("Please, enter your number:");
  5.     scanf("%i", &n);
  6.     printf("\nYour number is");
  7.     x=n%10;
  8.     if(x%2==0) printf(" even.");
  9.     else printf(" odd.");
  10.     return 0;
  11. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement