Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

Paladrone

Name: Anonymous 2006-12-21 8:33

Optimize this code bitches!

#include <iostream>
using std::cout;
using std::cin;
using std::endl;
int main()
{

     long a,b,c,d,e,f;
     char exit;

     cout << "Please input a 5 digit paladrone number: ";
     cin >> a;

     b = a/10000;
     cout << b << endl;
     c = (a%10000/1000);
     cout << c << endl;
     d = (a%1000/100);
     cout << d << endl;
     e = (a%100/10);
     cout << e << endl;
     f = a%10;
     cout << f << endl;

     if (b == 0) {cout << "That isn't a 5 digit number";}
     else if (b != c){cout << "The first number doesn't match with the last";}
     else if (f != d) {cout << "The secound number doesn't match with the fourth";}
     else {cout << b << f << e << d << c << " is a paladrone";}     return 0;


}

Name: Anonymous 2006-12-28 10:38

perl -ple'$_=is." not"x\!\!($_-reverse)." a palindrome."'

Name: Anonymous 2006-12-28 14:32

perl -ple'$_=is." not"x($_!=reverse)." a palindrome."'

and for >>37:
perl -ple'$_=is.(/\D/?" not a number.":" not"x(($_*=1)!=reverse)." a palindrome.")'

Name: Anonymous 2006-12-28 15:58

>>41
awesome use of the x operator

Name: Anonymous 2006-12-30 19:10

Perl is made of hack and shit.

Name: Anonymous 2009-01-14 14:11

lol

Name: Anonymous 2010-12-06 9:20

Back to /b/, ``GNAA Faggot''

Name: Anonymous 2010-12-17 1:23

Are you GAY?
Are you a NIGGER?
Are you a GAY NIGGER?

If you answered "Yes" to all of the above questions, then GNAA (GAY NIGGER ASSOCIATION OF AMERICA) might be exactly what you've been looking for!

Name: Sgt.Kabu뗤亗kiman頮陿 2012-05-28 21:32

Bringing /prog/ back to its people
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy
All work and no play makes Jack a dull boy

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List