473,395 Members | 1,680 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,395 software developers and data experts.

you guys i need help please!!!!!

1
yo guys please help..... ive been trying to solve this pro for days:

Write a C++ program to convert temperature from degree Celsius (TC) to

1) degrees Fahrenheit (TF) or

2 degrees Kelvin (TK), or

3) degrees Rankin (TR).

Your program should have the following features:

1) Displays a short message to the user describing the purpose of the program and prompt the user to enter the temperature in TC.

2) Display a menu and allow the user to select which temperature they want to convert to, TF or TK or TR. The user should exit the program by typing the character tilde (i.e. ~) available in the keyboard.

3) Based on user selection of convertion temperature (TF, or TK or TR), your program should calculate the requested temperature and display the resut.

4) Your program should allow the user to continue the selection for as long as he/she wants and only exit if they select the tilde (~) as described in number (2) above.
Jun 27 '07 #1
3 1686
Are you having difficulty with all of it or were you able to get some of it to work? The policy on here is to not give full on solutions to school projects, but we sure can help. Heres somethings to get you started.

1. You can use cout << to push things to the screen. Such as
Expand|Select|Wrap|Line Numbers
  1. cout << "Hello World" << endl;
the endl just means end-of-line.

2. You can use cin to input values from the user. For example:

Expand|Select|Wrap|Line Numbers
  1. string choice_str;
  2. cin >> choice_str;
3. After you get the data you wil just do the math to convert, not sure of the conversion factors but they should be easily accesible on the net.

4. You can setup a while loop to keep asking for choices.

If you have some more specific questions let us know.
Jun 28 '07 #2
archonmagnus
113 100+
So, what is your question? Do you need the conversion equations? Do you need help with reading keyboard input? Since this is worded like a homework question, I won't post code here. But, I (and others, I'm sure) will help if you have a general question.

These conversions should get you started:
(As this part isn't really code, I think this would be a valid amount of help)
F = 1.8 * C + 32
R = F + 459.67
K = C + 273.15
R = 1.8 * K

(F = Farenheit, C = Celsius, K = Kelvin, R = Rankine)
Jun 28 '07 #3
Read some C++ books.

So, what is your question? Do you need the conversion equations? Do you need help with reading keyboard input? Since this is worded like a homework question, I won't post code here. But, I (and others, I'm sure) will help if you have a general question.

These conversions should get you started:
(As this part isn't really code, I think this would be a valid amount of help)
F = 1.8 * C + 32
R = F + 459.67
K = C + 273.15
R = 1.8 * K

(F = Farenheit, C = Celsius, K = Kelvin, R = Rankine)
Jun 28 '07 #4

Sign in to post your reply or Sign up for a free account.

Similar topics

3
by: ron | last post by:
I can't figue out whats wrong. I am a newbie to sql, however i'm totally lost. i get this error. "Microsoft OLE DB Provider for ODBC Drivers error '80004005' Data source name not found and no...
2
by: Mike | last post by:
Hey guys, need some help understanding some things that maybe someone can explain or clarify it a little better then a text book. Here is my understanding so far: Class - basically a shell for...
3
by: ciffycyclops | last post by:
Hi i have written a vbscript to manage permanent event consumer classes of wmi .. here i used the NTEventLogEventConsumer class to store the specific event notification in the windows event...
1
by: kid | last post by:
guys need your help regarding this. $gen = "5,6,1"; $ld = "1,5,8"; $data_array = array("GEN" => $gen,"LD" => $ld); i want the output should be like this: hr,ld,gen,,hr,ld,gen
1
by: iniyan | last post by:
i want to display data into graph and chart using asp but not sure how to do it.i want to retrieve the data from mysql.
1
by: skygenn | last post by:
hi guys im new at c++ program and im 1st year taking up I.T our prof in c++ gave us an assignments but she didnt even explain us how to begin doing it? honestly i have no idea how to begin it...
3
by: zabaladesign | last post by:
hello guys.. please help me i made a program for my thesis and i need a textbox which will only accept telephone number like this format (954)-854-2452 .. please... please help me guys i really...
6
by: wassimdaccache | last post by:
Hello everybody I am almost done with my project. I am facing a problem with a primary form on my database when I enter a form contains 3 subforms it is setting allowadditon = false alone ...
21
by: Sean Watkins | last post by:
I have a form on my site that sends the form information directly to an email of mine. What I am wondering is the script that I would need to send a email back to the user who filled out my form,...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: ryjfgjl | last post by:
If we have dozens or hundreds of excel to import into the database, if we use the excel import function provided by database editors such as navicat, it will be extremely tedious and time-consuming...
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.