Skip to content

Instantly share code, notes, and snippets.

@NitinPraksash9911
Last active January 12, 2021 16:55
Show Gist options
  • Save NitinPraksash9911/7f0fc272075ef7b14acb4b14f82b49f0 to your computer and use it in GitHub Desktop.
Save NitinPraksash9911/7f0fc272075ef7b14acb4b14f82b49f0 to your computer and use it in GitHub Desktop.
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