Mail Archives: djgpp/1997/03/09/14:28:49
From: | "LSC" <liausc AT pl DOT jaring DOT my>
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | please help, wrong result from this program
|
Date: | 9 Mar 1997 18:03:05 GMT
|
Organization: | Unconfigured
|
Message-ID: | <01bc2cbc$6888c980$63708ea1@a>
|
NNTP-Posting-Host: | j25.jrc3.jaring.my
|
Lines: | 30
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Hi, I need help for this program. It doesn't give me the result that I
want. I compile by typing "gcc test13.c -o test13.exe" and I run the
program in DOS box in win95.
----------------------------------------------program-----------------------
-----------------------------
#include <conio.h>
#include <stdio.h>
int main()
{
char keyinput;
gotoxy(2,2);
printf("testing");
gotoxy(5,15);
printf("testing 2");
while (keyinput != 13) keyinput=getch();
return 0;
}
---------------------------------------------result that I expected (in
BASIC)--------------------
locate 2,2:print "testing"
locate 5,15:print "testing 2"
do
loop until inkey$=chr$(13)
----------------------------------------------result that I get(in
BASIC)------------------------------
do
loop until inkey$=chr$(13)
locate 5,15:print "testingtesting2"
- Raw text -