is the equation:
[yards] = [miles] / 1760 .......... if your finding the yards and if your finding the miles do u put:
[miles]= yards* 1760 ?
is that right?
*************************************************************
the assignment is to write a program that will read and convert it to miles or yards. Your program should have a title an intro. You may need to errotrap the input.
My work looks like this write now:
title: Converter
Intro: This program allows you to change miles into yards.
input: Please enter the type of measurement (miles or yards):
Please enter the number : [number]
Posted: Fri Nov 24, 2006 8:01 pm Post subject: (No subject)
You basically just answered your own question. Get the input and put it into the equation. That is all you need to do.
jrblast
Posted: Sat Nov 25, 2006 8:38 pm Post subject: (No subject)
if 1 mile = 1760 yards then shouldnt x yards = number of miles * 1760?
code:
[yards]=[miles]/1760
[miles]=[yards]*1760
You have your multiplication and division signs in the wrong place.
Expirant
Posted: Sun Nov 26, 2006 1:04 pm Post subject: (No subject)
jrblast wrote:
if 1 mile = 1760 yards then shouldnt x yards = number of miles * 1760?
code:
[yards]=[miles]/1760
[miles]=[yards]*1760
You have your multiplication and division signs in the wrong place.
Actually, I think it would be:
yards = miles * 1760yards/mile
miles = yards / 1760yards/mile
(in both cases the similar terms cancel out on the right side of the equation)
ericfourfour
Posted: Sun Nov 26, 2006 3:29 pm Post subject: (No subject)
Wow you guys are going overboard for some simple algebra. Simply solve for a proportion.
1 mile / 1760 yards = x miles / y yards. If you want the miles solve for x or if you want the yard solve for y. I think this is what Expirant was trying to say.
Expirant
Posted: Sun Nov 26, 2006 9:11 pm Post subject: (No subject)
ericfourfour wrote:
Wow you guys are going overboard for some simple algebra. Simply solve for a proportion.
1 mile / 1760 yards = x miles / y yards. If you want the miles solve for x or if you want the yard solve for y. I think this is what Expirant was trying to say.
I just explained it the way I was taught. That's what I meant though, yup.