LoginSignup
3
2

More than 5 years have passed since last update.

C言語でPPAP

Last updated at Posted at 2016-11-25

つい、やってしまった。出来心。http://qiita.com/on0z/items/ef32f79bde5452a2ccec が発祥?

#include <stdio.h>
#include <stdlib.h>

int main()
{
  const char* kw[] = {"Pen", "Pineapple", "Apple", "Pen"};
  unsigned ppap = -1;

  while (ppap != 0x1b) { // '00 01 10 11'
    ppap = ((ppap << 2) | (rand() & 3)) & 0xff;
    puts(kw[ppap & 3]);
  }
}

See also: http://qiita.com/yohhoy/items/09c95cae51146d3fd788

3
2
0

Register as a new user and use Qiita more conveniently

  1. You get articles that match your needs
  2. You can efficiently read back useful information
  3. You can use dark theme
What you can do with signing up
3
2