by pretentious on Sat May 12, 2012 11:21 pm
([msg=66295]see Re: In Need of Help[/msg])
a common one is a temperature converter but i'd reccomend you just think of a problem that needs to be solved and try and impliament a program to solve it. Don't be afraid to experiment, you'll probably fail and develope an intuition about what the boundaries of the language are
- Code: Select all
#include <iostream>
using namespace std;
int main()
{
char i;
int k;
cout<<"enter shift: ";
cin>>k;
for(;;)
{
cin>>i;
i = ((int(i)+k-97)%26) +97;
cout<<i;
}
return 0;
}
In one of my uni classes, we were working on encryption and i had to decrypt a Ceasar cipher. Rather than thinking(not a hoby of mine when uni is involved) i decided to brute force it and kept this code in case i run into a similar problem again. There are a few logical errors which you will find if you play with it
Goatboy wrote:Oh, that's simple. All you need to do is dedicate many years of your life to studying security.
IF you feel like exchanging ASCII arrays, let me know ;)
My crime is that of outsmarting you, something that you will never forgive me for.
Damn kid.