www.vustudents.ning.com

We non-commercial site working hard since 2009 to facilitate learning Read More. We can't keep up without your support. Donate.

# CS201 Assignment # 1 Complete and Tested Solution by ILLUSIONIST :)

Hello Guys! this is complete and tested solution....but u must change variables names and as per assignment requirement it should be well commented ........so here is ur job to do comment where u think it is necessary

if u need assistance u can contact me:

Contact me here :P

#include<iostream>

#include <cstdlib>

using namespace std;

int main()

{

double far_temp, kel_temp, cal_temp;

char opt, select;

cout " ************* Temprature Conversion Calculator *************";

cout "\n\n Please enter the temprature unit for which you want the conversion ";

cout "\n 1. F for Fahrenheit to Celsius and Kelvin";

cout "\n 2. C for Celsius to Fahrenheit and Kelvin";

cout "\n 3. K for Kelvin to Fahrenheit and Celsius";

do // for do, while loop

{

cout "\n\n Please enter you Option: ";

cin >> opt;

switch(opt) // switch statements

{

case 'f':

case 'F':

{

cout " Enter temprature in Farhenheit: ";

cin >> far_temp;

cal_temp = (far_temp  -  32)  *  5/9;

kel_temp = (far_temp + 459.67) * 5/9;

cout " Celcius =" cal_temp;

cout "\n Kelvin =" kel_temp;

break;

}

case 'c':

case 'C':

{

cout " Please enter temprature in Celcius: ";

cin >> cal_temp;

kel_temp = cal_temp + 273.15 ;

far_temp = cal_temp  *  9/5 + 32;

cout " Farhenheit =" far_temp;

cout "\n Kelvin =" kel_temp;

break;

}

case 'k':

case 'K':

{

cout " Please enter temprature in Kelvin: ";

cin >> kel_temp;

cal_temp = kel_temp - 273.15 ;

far_temp = (kel_temp - 273.14)  * 9/5 + 32;

cout " Celcius =" cal_temp;

cout "\n Farhenheit =" far_temp;

break;

}

default:

{

cout "\n Please enter valid option (C, F, K)";

}

}

cout"\n Do you want to continue (y/n):";

cin>>select;

if(select=='n') //for exit

{

system("pause");

}

}

while(select=='y'); //for loop

}

Views: 1134

Attachments:

### Replies to This Discussion

dears all

Any body have solution.

kisi k pas asal & darust solution ha to bata do yaar.    ye sab to wrong hai.

plzzzzzzzzzzzzzz send me c++ soft ware i have to submit my asignment bt i have not the software. plzzzzzzzzzzzzzzzzz any body send it now

Dev C++

plzz koi cs201 k instructor ka e mail day sakta hai

asif sahib ap k pas cs201 instructor ka e mail address ho ga

cs201@vu.edu.pk

1

2

3

4

5

## VIP Member Badge & Others

------------------------------------

## Latest Activity

5 minutes ago
1 hour ago
Muhammad Bilal replied to BBA(6th smes)'s discussion assignment 1 spring 2021 in the group MGT402 Cost & Management Accounting
2 hours ago
★---★ ⱮԱϚҠȺហ ȺచȺហ ★---★ updated their profile
2 hours ago
Mani Siddiqui posted a discussion

3 hours ago
4 hours ago
4 hours ago
5 hours ago