Hello. So, I'm a newbie, and this is my second hard assignment. In this assignment, I have to decrypt the message from the teacher (well, not only this, it should open and decrypt any text file). So, the example line would be:
Ftq Pqoxmdmfuaz ar Uzpqbqzpqzoq ar ftq Ftudfqqz Oaxazuqe
Uz OAZSDQEE, Vgxk 4, 1776
But what I'm most concerned about, is that
Rad uybaeuzs Fmjqe az ge iuftagf agd Oazeqzf: should mean something I don't know what, since in the cipher, "Return to Rome" would be encrypted as, "Uhwxuq wr Urph". 3 letters ahead. So, Rad should mean what, O(w?)a. I mean, WHAT??? So, I reviewed some examples here, none of which work the right way. Please help me. It's due this Sunday, 10 o'clock.
miha2
-10
Light Poster
Recommended Answers
Jump to PostBefore attempting to decrypt that you need to know the shift value, and whether it was shifted right or left. I suppose you could solve it by iterating through all 26 possible shift values ('A' - 'Z' = 1-26) assuming case is ignored.If not then there would be at least …
Jump to PostThe ASCII table shows that A - Z has ASCII code of 65 - 90. On the other hand a - z has ASCII code of 97 - 122
You could manipulate the text as 'char' using ASCII code. For example, in the Caesar cipher, B (66) would be …
Jump to PostWell, all you have to do is subtract 3 from the character
int main() { char c = 'A'; if( isalpha(c) ) { c -= 3; if( c < 'A') { c = 'Z' - ('A' - c)+1; } } cout << c << '\n'; }
Now …
Jump to Postfor each character? that way the code will be too long, and I for some reason don't see a void or any other user defined function... IT HAS TO BE IN HERE! it's all my homework is about.
So you were expecting us to write your program for you? Not …
Jump to PostWrite some code already!!!!
Read a line of text.
Write the line of text.
End of program.If you hadn't wasted the past 10 hours BSing and trying to convince us to write it for you, you'd be on to the next step already. As it's going, you won't …
All 39 Replies
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
miha2
-10
Light Poster
chiwawa10
77
Junior Poster
Ancient Dragon
commented:
exactly :)
+34
miha2
-10
Light Poster
miha2
-10
Light Poster
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
miha2
-10
Light Poster
WaltP
2,905
Posting Sage w/ dash of thyme
Team Colleague
Nick Evan
4,005
Industrious Poster
Team Colleague
Featured Poster
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
miha2
-10
Light Poster
miha2
-10
Light Poster
Taywin
312
Posting Virtuoso
WaltP
2,905
Posting Sage w/ dash of thyme
Team Colleague
miha2
-10
Light Poster
chiwawa10
77
Junior Poster
Kremlan
-3
Newbie Poster
miha2
-10
Light Poster
Ancient Dragon
5,243
Achieved Level 70
Team Colleague
Featured Poster
miha2
-10
Light Poster
miha2
-10
Light Poster
miha2
-10
Light Poster
WaltP
2,905
Posting Sage w/ dash of thyme
Team Colleague
miha2
-10
Light Poster
miha2
-10
Light Poster
miha2
-10
Light Poster
WaltP
2,905
Posting Sage w/ dash of thyme
Team Colleague
Kremlan
-3
Newbie Poster
miha2
-10
Light Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.