Advertisement
huutho_96

nhập môn

Sep 23rd, 2015
362
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.37 KB | None | 0 0
  1. #include <conio.h>
  2. #include <stdio.h>
  3. int main()
  4. {
  5.     unsigned int a;
  6.     printf("\nNhap so nguyen duong: ");
  7.     scanf("%u", &a);
  8.     printf("\n%u", a);
  9.     switch (a % 2)
  10.     {
  11.     case 0:
  12.         printf("\nSo vua nhap la so chan");
  13.         break;
  14.     case 1:
  15.         printf("\nSo vua nhap la so le");
  16.         break;
  17.     default:
  18.         printf("\nBan phai nhap so nguyen duong");
  19.     }
  20.     getch();
  21.     return 0;
  22. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement