fork download
  1. <?php
  2.  
  3. $hi = fopen('php://stdin', "r");
  4. $ho = fopen('php://stdout', "w");
  5.  
  6. while (true) {
  7. fscanf($hi, "%d", $n);
  8. if ($n == 42) break;
  9. fwrite($ho, sprintf("%d\n", $n));
  10. }
  11.  
  12. fclose($ho);
  13. fclose($hi);
Success #stdin #stdout 0.02s 25976KB
stdin
1
2#define_XTAL_FREQ4000000
#include<xc.h>
#oragma config FOSC =HS
#pragma config WDTE=OFF
#pragma config PWRTE =OFF
#pragma config BOREN =ON
#pragma config LVP=OFF
#pragma config CPD =OFF
#pragma config WRT=PFF
#pragma config CP=OFF

int main(){
TRISD.RD2=0;
while(1)
{
 RD2=0;
 _delay_ms(1000);
RD2=1;
_delay_ms(1000);
}
return(0);
)
10
42
11
stdout
1
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
2
10