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...
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...
0 Comments:
Post a Comment
<< Home