Wednesday, June 19, 2013

Program to purify beer.

Fresh batch just joined the prestigious institute of technology. Budding engineers were dreaming big, aiming high.

Our Peddgunda also had enrolled into the CS department.

After a month of studying programming languages, He attempted a tough problem which was given as an exercise.

Question: Write a program to purify beer.

Here was his solution.

//Write a program to purify beer.
#include <iostream>
#include <string>

using std::cout ;
using std::endl ;
using std::string ;

int main()
    string drink("beer");
    drink[0] += 12;
    cout << drink << endl;
    return 0;

Well, no comments on that...