Skip to content

Instantly share code, notes, and snippets.

@iqfareez
Last active December 27, 2020 13:35
Show Gist options
  • Save iqfareez/99a082514197751c2b08048139249fef to your computer and use it in GitHub Desktop.
Save iqfareez/99a082514197751c2b08048139249fef to your computer and use it in GitHub Desktop.
Code to determine student gender based on matric number (IIUM)
//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;
}
@iqfareez
Copy link
Author

Sebab aku baru tahu lol
image

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