Simple program that "curses" code written in C-family programming languages.
#include <iostream>
using namespace std;
int main() {
int number;
if (cin >> number) {
if (number == 42) {
cout << "correct" << endl;
}
else {
cout << "nope" << endl;
}
}
else {
cout << "you didn't even try" << endl;
}
return 42;
}
./ccurse < test.cc > test.cursed.cc
#include <iostream>
using namespace std ;
int main() {
int number ;
if (cin >> number) {
if (number == 42) {
cout << "correct" << endl ;
}
else {
cout << "nope" << endl ;
}
}
else {
cout << "you didn't even try" << endl ;
}
return 42 ;
}