From: "Stewart" Newsgroups: comp.os.msdos.djgpp Subject: convert miles to kilometres Lines: 11 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 5.50.4133.2400 X-MimeOLE: Produced By Microsoft MimeOLE V5.50.4133.2400 Message-ID: Date: Mon, 26 Feb 2001 23:11:51 GMT NNTP-Posting-Host: 142.177.226.160 X-Complaints-To: abuse AT mpoweredpc DOT net X-Trace: sapphire.mtt.net 983229111 142.177.226.160 (Mon, 26 Feb 2001 19:11:51 AST) NNTP-Posting-Date: Mon, 26 Feb 2001 19:11:51 AST Organization: MPowered-Subscriber To: djgpp AT delorie DOT com DJ-Gateway: from newsgroup comp.os.msdos.djgpp Reply-To: djgpp AT delorie DOT com Can you help me write a C++ program that uses include which has a function to convert miles to kilometres. ( 1 km = 0.621371 miles I think) What const double can I use for the conversion factor? In more particular terms, I need help to write a program that prompts the user for a value in miles and outputs the equivalent value in km using a precision of 2 digits after the decimal. In the function definition need to take the miles variables as a formal parameter and returns the km value. I think I know how a prototype can be used but I don't know how to write a program where you don't need to use it. Can anyone help me?