1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61
|
#include <iostream>
using namespace std;
int main (int argc, char * const argv[]) {
char array[1][26]= { {'a','b','c','d','e','f','g','h','i','j','k','l','m','n','o','p','q','r','s','t','u','v','w','x','y','z'},
{'z','y','x','w','v','u','t','s','r','q','p','o','n','m','l','k','j','i','h','g','f','e','d','c','b','a'} };
char rname[20];
int arraypos[20];
int abc;
for(abc=0;abc<=20;abc++)
{
cin>> rname[abc];
if (rname[abc]==',')
{
break;
}
arraypos[abc]=abc;
}
int io,yo,oi;
for (io=0;io<=20;io++){
if (arraypos[io]>=1) {
yo=arraypos[io];
}
else {
break;
}
for (oi=0; oi<=26; oi++) {
if (yo=oi) {
cout << "Your world is :" << array[2][yo];
}
}
yo=0;
}
return 0;
}
|