Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <cstdio>
- #include <cstdlib>
- #include <stdio.h>
- #include <math.h>
- #include <iomanip>
- using namespace std;
- int main()
- {
- //int aasta;
- char isikukood[20];
- cout << "Sisestage oma isikukood:" << endl;
- cin >> isikukood;
- if (isikukood[0]=='3')
- {
- cout << "Te olete meessoost ning";
- }
- else if (isikukood[0]=='4')
- {
- cout << "Te olete naissoost ning";
- }
- cout << " te olete syndinud 19" << isikukood[1] << isikukood[2] << " aastal, " << isikukood[5] << isikukood[6] << ".";
- switch (isikukood[3])
- {
- case '0':
- switch (isikukood[4])
- {
- case '1':
- cout << " jaanuaril ";
- case '2':
- cout << " veebruaril ";
- case '3':
- cout << " m2rtsil ";
- case '4':
- cout << " aprillil ";
- case '5':
- cout << " mail ";
- case '6':
- cout << " juunil ";
- case '7':
- cout << " juulil ";
- case '8':
- cout << " augustil ";
- case '9':
- cout << " septembril ";
- }
- case '1':
- switch (isikukood[4])
- {
- case '0':
- cout << " oktoobril ";
- case '1':
- cout << " novembril ";
- case '2':
- cout << " detsembril ";
- }
- }
- cout << endl << endl;
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement