GIDForums  

Go Back   GIDForums > Computer Programming Forums > C++ Forum
User Name
Password
Register FAQ Members List Calendar Search Today's Posts Mark Forums Read

 
 
Thread Tools Search this Thread Rate Thread
  #1  
Old 18-Jan-2004, 16:28
newbie newbie is offline
New Member
 
Join Date: Jan 2004
Posts: 2
newbie is on a distinguished road

help!!!!!!!! C++ homework


hey guys, i am taking a C++ rite now, and i have problems understand it so, i am really need some help here, thanks guys.

1. Use STRUCT write a C++ program that can let user input a temperature, either C or F,and detect whether this temperature is a freezing point or not.

2. design a struct to store information in each of the following cases. Write a program based on the struct u constructed. Use comment lines to describe the problem ur program solves.
- time in civilian format ( hours, minutes, seconds, and AM/PM indicator)
- card in a deck of playing cards ( suits, and numbers)
- date in the format of year, month, day
- student record that contains ID, name, and grade.

P.S make it clear so i can understand, thank you guys.
  #2  
Old 20-Jan-2004, 09:34
newbie newbie is offline
New Member
 
Join Date: Jan 2004
Posts: 2
newbie is on a distinguished road
Unhappy

come guys, any C++ whiz care to help me???? :-(
  #3  
Old 20-Jan-2004, 09:41
warny_maelstrom warny_maelstrom is offline
Junior Member
 
Join Date: Jan 2004
Posts: 41
warny_maelstrom will become famous soon enough
I believe the general consensus of people viewing the post is probably "why don't you try writing it yourself first", I know there are loads of tutorials on the web for such simple programs and I managed to find one that was relevant straight away. Just attempt to write it urself but this might be a starting point, I say might because Iv never done C++, however i can read tutorials.

CPP / C++ / C Code:
#include <iostream>

using namespace std;

int main()
{
    cout << "Temperature Conversion Program." << endl;
    cout << "Enter degrees Celsius from 0 to 100: " << flush;

    double degreesCelsius;
    cin >> degreesCelsius;
    
    double degreesFahrenheit = degreesCelsius*(9.0/5.0)+32;
    
    cout << degreesCelsius << " degrees Celsius = ";
    cout << degreesFahrenheit << " degrees Fahrenheit" << endl;    
}
 
 

Recent GIDBlogWelcome to Baghdad by crystalattice

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Forum Jump

Network Sites: GIDNetwork · GIDWebHosts · GIDSearch · Learning Journal by J de Silva, The

All times are GMT -6. The time now is 20:19.


vBulletin, Copyright © 2000 - 2008, Jelsoft Enterprises Ltd.