Mail Archives: djgpp/1998/10/12/05:07:11
Message-ID: | <3621C580.C4C241F7@nceye.net>
|
From: | Alexei Akimov <sabrah AT nceye DOT net>
|
X-Mailer: | Mozilla 4.05 [en] (Win95; I)
|
MIME-Version: | 1.0
|
Newsgroups: | comp.os.msdos.djgpp
|
Subject: | function basics
|
Lines: | 22
|
NNTP-Posting-Host: | 206.107.98.60
|
X-Trace: | news6.ispnews.com 908182916 206.107.98.60 (Mon, 12 Oct 1998 05:01:56 EDT)
|
NNTP-Posting-Date: | Mon, 12 Oct 1998 05:01:56 EDT
|
Organization: | ISPNews http://ispnews.com
|
Date: | Mon, 12 Oct 1998 05:01:52 -0400
|
To: | djgpp AT delorie DOT com
|
DJ-Gateway: | from newsgroup comp.os.msdos.djgpp
|
Reply-To: | djgpp AT delorie DOT com
|
Hya,
does anyone know why the code below displays always the same: 317072
317068. And to get it read and print data properly?
thanx
#include <conio.h>
void prompt( int &hrs, int &mnts)
{
printf("Plz enter begining time, separating hours & minutes");
scanf ("%d %d", &hrs, &mnts);
}
int main()
{
int hrs1, mnts1;
prompt( hrs1, mnts1);
printf ("U entered %d and %d", &hrs1, &mnts1);
return 0;
}
- Raw text -