Last active
December 27, 2020 13:35
-
-
Save iqfareez/99a082514197751c2b08048139249fef to your computer and use it in GitHub Desktop.
Code to determine student gender based on matric number (IIUM)
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 matric number | |
#include <iostream> | |
using namespace std; | |
int main() | |
{ | |
int matricNum; | |
cout << "Enter your matric num: "; | |
cin >> matricNum; | |
if (matricNum % 2 == 0) //even | |
cout << "Gender is sister."; | |
else //odd | |
cout << "Gender is brother."; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Sebab aku baru tahu lol
