#include <stdio.h> // If Ctrl + D, then exit int main() { int a; while(1) { a = getchar(); if(a == EOF) // EOF is Ctrl+Z in Windows and Ctrl+D in Linux break; putchar(a); }; return(0); }
#include <stdio.h> // If Ctrl + D, then exit int main() { int a; while(1) { a = getchar(); if(a == EOF) // EOF is Ctrl+Z in Windows and Ctrl+D in Linux break; putchar(a); }; return(0); }