Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <stdio.h>
- int main ()
- {
- char c;
- puts ("Enter q to exit:");
- do {
- c = getchar();
- putchar(c);
- } while (c != 'q');
- return 0;
- }
- using System;
- using System.IO;
- public static void Main(String[] args)
- {
- ConsoleKeyInfo k;
- Console.WriteLine("Enter q to exit:");
- do {
- k = Console.ReadKey();
- Console.WriteLine(k.KeyChar);
- } while (k.KeyChar != 'q');
- return 0;
- }
Add Comment
Please, Sign In to add comment