Skip to content

Instantly share code, notes, and snippets.

@iqfareez
Created December 27, 2020 13:47
Show Gist options
  • Save iqfareez/065fb0f7796096c66fe6cce77ef71327 to your computer and use it in GitHub Desktop.
Save iqfareez/065fb0f7796096c66fe6cce77ef71327 to your computer and use it in GitHub Desktop.
C++ script to determine gender based on IC Number (Malaysia)
//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;
}
@iqfareez
Copy link
Author

image
CodeSnap

@iqfareez
Copy link
Author

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment