/ Published in: C
This Code is only for Windows because of getch(); It Increase or Decrease tow number. Depending on which button you press '+' or '-'.
Expand |
Embed | Plain Text
// Only for Windows because of getch(); #include <stdio.h> int main() { int i, x, y; char action; Begin: scanf("%d", &x); getchar(); scanf("%d", &y); getchar(); do { action = getch(); if(action == '+') { x++; y++; } else if(action == '-') { x--; y--; } } while((action == '-') || (action == '+')); goto Begin; getchar(); return 0; }
You need to login to post a comment.
