Created
October 11, 2016 09:44
-
-
Save horvathgyozo/e0ace1a88a9564945c568b45e99f4190 to your computer and use it in GitHub Desktop.
This file contains 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
#include <iostream> | |
using namespace std; | |
int main() | |
{ | |
//1. dekl | |
int n; | |
string nap; | |
const string napok[7+1] = { | |
"","H","K","Sze","Cs","P","Szo","V" | |
}; | |
//2. beolv | |
bool jo; | |
do { | |
cout << "Het hanyadik napja: "; | |
cin >> n; | |
jo = n>=1 && n<=7; | |
if (!jo) { | |
cout << "Nem jo" << endl; | |
} | |
} while(!jo); | |
//3. feld, alg | |
nap = napok[n]; | |
//4. ki | |
cout << "Ez az a nap: " << nap << endl; | |
return 0; | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment