programming assignment
play

Programming Assignment 1. Temperature Converter Deadline: 2018/12/7 - PowerPoint PPT Presentation

Dept. of Computer Science & Engineering @ Seoul National University Programming Assignment 1. Temperature Converter Deadline: 2018/12/7 1:00PM 2018 Fall Computer Concept & Practice Prof. Sang Lyul Min TA: Minwook Kim (ace@snu.ac.kr)


  1. Dept. of Computer Science & Engineering @ Seoul National University Programming Assignment 1. Temperature Converter Deadline: 2018/12/7 1:00PM 2018 Fall Computer Concept & Practice Prof. Sang Lyul Min TA: Minwook Kim (ace@snu.ac.kr)

  2. Temperature scales  Celsius  Definition • freezing point of water is defined to be 0°C and boiling point of water is defined to be 100°C (at 1 atm pressure), a 100°C separation.  Fahrenheit  Definition • freezing point of water is defined to be 32°F and boiling point of water is defined to be 212°F (at 1 atm pressure), a 180°F separation.  Scale conversion (Fahrenheit to Celsius) �  F2C: �  Absolute zero  The lowest limit of the thermodynamic temperature scale.  -273°C (approximation) Dept. of Computer Science & Engineering 2 @ Seoul National University

  3. F2C Converter  Basic function  input: the temperature expressed in Fahrenheit scale  output: converted temperature in Celsius scale  Restriction  Your program must print a prompt message to tell the user as entering a Fahrenheit scale temperature.  The printed result must have two or more significant digits below the decimal point. ( 소수점 아래 2 개 이상의 유효 숫자 )  If converted value(in Celsius) is smaller than the absolute zero(-273°C), your program must tell the input is invalid and ask user a new input value. This process should be repeated until the input value is converted in the valid range(≥ -273°C ) .  Submission  You should make a ‘f2c’ subdirectory in your home directory.  Only your C source code and compiled execution file must be in the ‘f2c’ directory. Dept. of Computer Science & Engineering 3 @ Seoul National University

  4. Example Dept. of Computer Science & Engineering 4 @ Seoul National University

Download Presentation
Download Policy: The content available on the website is offered to you 'AS IS' for your personal information and use only. It cannot be commercialized, licensed, or distributed on other websites without prior consent from the author. To download a presentation, simply click this link. If you encounter any difficulties during the download process, it's possible that the publisher has removed the file from their server.

Recommend


More recommend