Last active
January 12, 2021 16:55
-
-
Save NitinPraksash9911/7f0fc272075ef7b14acb4b14f82b49f0 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
enum OutputDevice {PRINTER, DISK} | |
public fun copy(OutputDevice dev){ | |
val c:int | |
while((c=readKeyBoard)!=EOF){ | |
if(dev==PRINTER) | |
{ | |
writePrinter(c) | |
}else{ | |
writeToDisk(c) | |
} | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment