cryptic message help
Mar 19, 2013 at 3:05am UTC
This is suppose to take in a message and return it in upper and lower cade cryptic message . there should be the use of bool islower(char) abd bool isupper(char)
This is what i have so far:
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
#include <cstdlib>
#include <iostream>
#include <cctype>
using namespace std;
int main()
{
int shift;
string message;
string cript;
char curChar;
int curCode;
cout<<"shift 0-25 :" <<endl;
cin>>shift;
getline(cin,message);
cin.ignore();
cout<<"Plain text :" <<endl;
getline(cin,message);
for (int i=0; i< message.length(); i++)
{
curChar = message.at(i);
if ( isalpha(curChar))
{
curChar = message.at(i);
curCode= int (curChar);
cout<< curChar <<"______________________" << curCode <<endl;
}
}
cout<<"the message is" <<message<<endl;
system("PAUSE" );
return EXIT_SUCCESS;
}
Topic archived. No new replies allowed.