CS201 Introduction to Programming Assignment No. 01 Solution and Discussion 2013 Due Date 25 Nov,2013 Read more: CS201 Introduction to Programming Assignment No. 01 Solution and Discussion 2013

Instructions:

Please read the following instructions carefully before submitting assignment. It should be clear that your assignment will not get any credit if:

 

  • The assignment is submitted after due date.
  • The submitted assignment does not open or file is corrupt.
  • Assignment is copied(partial or full) from any source (websites, forums, students, etc)

 

Note: You have to upload only .cpp file. Assignment in any other format (extension) will not be accepted and will be awarded with zero marks. For example, if you submit code in .doc (Word document) or .txt files or .exe file, no reward will be given in any case.

 

 

Objective:

 

The objective of this assignment is to provide hands on experience of:

 

  • Basic concepts of C/C++ language and Programming
  • Dealing with Data types
  • Repetition Structures (Loops)
  • Switch statement
  • Saving a program
  • Compiling a program
  • Executing the program

 

 

Guidelines:

 

  • Code should be properly indented and well commented.
  • Follow C/C++ rules while writing variable names, function names etc
  • Use only dev-C++ for this assignment.

 

Assignment 

 

 

 

Problem Statement:    

 

You are required to write a simple “Temperature Conversion Calculator” using C++ language. The objective of this program should be to convert one temperature unit to other temperature units. These temperature units are Fahrenheit, Celsius and Kelvin etc.

 

 

Detailed Description:

 

The program should prompt the user to enter his/her option.

 

The program should respond in the following ways using switch statement:

 

  1. If user enters option ‘F’ or ‘f’ then it should prompt the user to enter temperature in Fahrenheit. It should then convert it into Celsius and Kelvin and display the values on the screen.
  2. If user enters option ‘C’ or ‘c’ then it should prompt the user to enter temperature in Celsius. It should then convert it into Fahrenheit and Kelvin and display the values on the screen.
  3. If user enters option ‘K’ or ‘k’ then it should prompt the user to enter temperature in Kelvin. It should then convert it into Celsius and Fahrenheit and display the values on the screen.

 

After performing conversion operation, it should ask the user to continue or not. If user enters ‘n’ then it will quit the program otherwise it will perform the operation again

 

Sample output of program:

 

 

 

 

 

 

 

When user enters option C or c then it convert into Fahrenheit and Kelvin

 

 

 

 

When user enters option F or f then it convert into Celsius and Kelvin

 

 

 

 

 

 

 

 

 

 

 

 

 

 

When user enters option K or k then it convert into Celsius and Fahrenheit

 

 

 

 

Hint:

 

Use the formulas given below for conversion.

K = °C + 273.15

°F = °C × 9⁄5 + 32

K  = (°F + 459.67) × 5⁄9



Views: 417

Replies to This Discussion

Gd work

Correct Solution file ...

Attachments:

RSS

Discussion Forum

CS201 Assignment No 01 Solution & Discussion Due Date: 05-12-2018

Started by +" Heaven Scent "+.
Last reply
by Muhammad Aasim Ijaz Dec 4, 2018. 6 Replies

Any one from wahcantt

Started by Zohaib Hassan Nov 8, 2018. 0 Replies

CS201 Finalterm Papers from Sep 1st to 13th, 2018

Started by + caмe4ѕтυdιeѕ.
Last reply
by + caмe4ѕтυdιeѕ Sep 4, 2018. 3 Replies

GBD CS 201 last date: 12 August Spring 2018

Started by Sayyeda Shah.
Last reply
by Muhammad Asif Khan Aug 13, 2018. 6 Replies

CS201 Assignment # 3 Due Date: 26th July, 2018

Started by + caмe4ѕтυdιeѕ.
Last reply
by Sayyeda Shah Aug 9, 2018. 5 Replies

CS201 Midterm papers Spring 2018

Started by + caмe4ѕтυdιeѕ.
Last reply
by °`·Я Hk D Яаиî·´° Jul 4, 2018. 4 Replies

CS201 Assignment # 2 Due Date: 28th May, 2018

Started by + caмe4ѕтυdιeѕ.
Last reply
by Shifaat May 27, 2018. 6 Replies

CS201 Assignment # 1 Due Date: 7th May, 2018

Started by + caмe4ѕтυdιeѕ.
Last reply
by Mani BSCS VI May 7, 2018. 19 Replies

CS201 GDB Solution Fall 2017

Started by Cute S@mra.
Last reply
by Abli Mughal Aug 10, 2018. 1 Reply

SPONSORED LINKS

© 2019   Created by Muhammad Anwar Tahseen.   Powered by

Badges  |  Report an Issue  |  Terms of Service