Jiskha Homework Help
SATURDAY
November 21, 2009
SCHOOL SUBJECTS
- Art
- Business
- Computers
- English
- Foreign Languages
- Health
- Home Economics
- Math
- Music
- Physical Education
- Science
- Social Studies
GRADE LEVELS
- Preschool
- Kindergarten
- Elementary School
- 1st Grade
- 2nd Grade
- 3rd Grade
- 4th Grade
- 5th Grade
- 6th Grade
- 7th Grade
- 8th Grade
- High School
- 9th Grade
- 10th Grade
- 11th Grade
- 12th Grade
- College
- Adult Education
Post a New Question | Current Questions | Chat With Live Tutors

Homework Help Forum: C Programming

Posted by gnozahs on Thursday, September 24, 2009 at 11:20am.

Write a program that prompts the user to enter a temperature, followed by a letter representing Celsius
(C) or Fahrenheit (F). Then prompt the user for the conversion type and print the results to the screen
with one decimal point. If the user enters a letter other than 'C' or 'F', the program should print an error
message.
Specifications:
You must use the switch statement for this program, and the program should be able to recognize
lowercase ('c' or 'f') or uppercase ('C' or 'F') letters for Celsius or Fahrenheit temperatures. If you
execute the program with the following inputs, the following information should be displayed:

Enter a temperature: 32.4
Enter 'C' for Celsius or 'F' for Fahrenheit: C
Choose a conversion ('C' for Celsius or 'F' for Fahrenheit): F
The temperature is: 90.3 F.

  • C Programming - MathMate, Thursday, September 24, 2009 at 8:08pm

    If you have started programming, you are probably aware that there are three steps to follow:
    1. understand the requirements, the input supplied, and the output desired, including the format and the calculations involved. The result of this phase is documentation.
    2. Plan how you will satisfy the requirements, design your algorithm and program flow. Most of the time these consist of the standard steps of input-calculations-output.
    The result of this phase of work is a pseudocode. Something similar to a flow chart, but in words, and in a language similar to but independent of a computer language.
    3. coding.
    From the pseudocode, you will code the program so that it will execute smoothly according to the requirements. This phase will include thorough testing to ensure there are no syntax or logical errors in your coding. The result of this phase is an executable program.

    Can you examine your project to see where you're at, and where you encounter difficulties? We will be glad to help at any stage of the project, but cannot without input from you.

Answer this Question

First Name:
School Subject:
Answer:

SEARCH

COMMUNITY
FEATURES
- Live Tutors
- Net Riddle
- Reference
- Search