Advertisement
nguyenhappy92

Kiểm tra n là số chẵn hay số lẻ

Oct 16th, 2015
277
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.26 KB | None | 0 0
  1. // Nhap vao n xac dinh la so chan han so le
  2. // Khai bao cac ham thu vien neu co
  3. #include<stdio.h>
  4. #include<conio.h>
  5.  
  6. void main()
  7. {
  8. int n;
  9. scanf("%d",&n);
  10. if(n%2==0)
  11. {
  12. printf ("%d la so chan",n);
  13. }
  14. else
  15. {
  16. printf(" %d la so le",n);
  17. }
  18. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement