LiveWire Peer Support Network

Printable Version of Topic "qbasic"

- LiveWire Teen Forums & College Forums (http://www.golivewire.com)
-- (http://www.golivewire.com/forums/support-technical.html)
--- Programming & Application Development (http://www.golivewire.com/forums/forum-211-s-0.html)
---- qbasic (http://www.golivewire.com/forums/peer-ieobpb-support-a.html)


-- Posted by jamescoleman at 6:58 am on April 29, 2008

so i have to write a program on metric to imperial conversion in qbasic. i'm having alot of trouble trying to do this. i'm not gonna cheat or anything but i just need a very good point in the correct direction in doing this.  
i know qbasic is old....


-- Posted by the5e at 6:59 am on April 29, 2008

if it's anything like C++ I can probably help you out


-- Posted by the5e at 7:04 am on April 29, 2008

basicly though, it's easy: Written in C++ pseudocode (you can get the idea):

float unconvertedVar = 0;
float convertedVar = 0;
string typeOfConversion;

(type in) unconvertedVar;
(type in) typeOfConversion;

if (typeOfConversion == "inches to feet") //this is just an example
{
convertedVar = unconvertedVar / 12;
}

(print out) convertedVar; //output variable



-- Posted by jamescoleman at 7:44 am on April 29, 2008

i wouldn't even understand the c++ pseudocode. lol but i can try


www.golivewire.com