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':
- if (isikukood[4]== '1')
- {
- cout << " jaanuaril ";
- }
- else if (isikukood[4]== '2')
- {
- cout << " veebruaril ";
- }
- else if (isikukood[4]== '3')
- {
- cout << " märtsil ";
- }
- else if (isikukood[4]== '4')
- {
- cout << " aprillil ";
- }
- else if (isikukood[4]== '5')
- {
- cout << " mail ";
- }
- else if (isikukood[4]== '6')
- {
- cout << " juunil ";
- }
- else if (isikukood[4]== '7')
- {
- cout << " juulil ";
- }
- else if (isikukood[4]== '8')
- {
- cout << " augustil ";
- }
- else if (isikukood[4]== '9')
- {
- cout << " septembril ";
- }
- case '1':
- if (isikukood[4]== '0')
- {
- cout << " oktoobril ";
- }
- else if (isikukood[4]== '1')
- {
- cout << " novembril ";
- }
- else if (isikukood[4]== '2')
- {
- cout << " detsembril ";
- }
- }
- cout << "V6rus." << endl << endl;
- system("pause");
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement