#include "stdio.h" /////// int main2() { int opx; int opy; tty_puts(" TASK 2 : PGCD \n"); while (1) { tty_puts("\n*******************\n"); tty_puts("operand X = "); tty_getw_irq(&opx); tty_printf("%d\n",opx); tty_printf("operand Y = "); tty_getw_irq(&opy); tty_printf("%d\n",opy); if( (opx < 1) || (opy < 1) ) { tty_puts("operands must be larger than 0\n"); } else { while (opx != opy) { if(opx > opy) opx = opx - opy; else opy = opy - opx; } tty_printf("pgcd = %d\n", opx); } } return 0; } // end main2