Created
December 27, 2020 13:47
-
-
Save iqfareez/065fb0f7796096c66fe6cce77ef71327 to your computer and use it in GitHub Desktop.
C++ script to determine gender based on IC Number (Malaysia)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//odd even ic number (Malaysia) | |
#include <iostream> | |
using namespace std; | |
int main() | |
{ | |
int icNumber; | |
cout << "Enter your matric num: "; | |
cin >> icNumber; | |
if (icNumber % 2 == 0) //even | |
cout << "Gender is woman."; | |
else //odd | |
cout << "Gender is man."; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Related: Matric Number Gender (IIUM)