We are here with you hands in hands to facilitate your learning & don't appreciate the idea of copying or replicating solutions. Read More>>

Looking For Something at vustudents.ning.com? Click Here to Search

www.bit.ly/vucodes

+ Link For Assignments, GDBs & Online Quizzes Solution

www.bit.ly/papersvu

+ Link For Past Papers, Solved MCQs, Short Notes & More

Do not copy this, try yourself. this is only for idea purpose. i added this in pdf and word format both.

+ How to Follow the New Added Discussions at Your Mail Address?

+ How to Join Subject Study Groups & Get Helping Material?

+ How to become Top Reputation, Angels, Intellectual, Featured Members & Moderators?

+ VU Students Reserves The Right to Delete Your Profile, If?


See Your Saved Posts Timeline

Views: 3247

.

+ http://bit.ly/vucodes (Link for Assignments, GDBs & Online Quizzes Solution)

+ http://bit.ly/papersvu (Link for Past Papers, Solved MCQs, Short Notes & More)

+ Click Here to Search (Looking For something at vustudents.ning.com?)

+ Click Here To Join (Our facebook study Group)

Attachments:

Replies to This Discussion

koi correct solution send kar do

Rubab .ccp ek file format jese hai k .doc Microsoft Word ki format ha.

.ccp file Dev C++ se open hoti and banti hai.

/Cs201 assignment No. 1 complete solution according to requirement
#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

}

This code uses concept of function call. Following is the code and i am uploading the cpp file.

# include <iostream>
# include <cstdlib>
using namespace std;

float F, C, K;
char unit, start;

void selection()
{
cout "\n Please enter your option:"; cin >> unit;
switch (unit)
{
    case 'F':
    case 'f':
        cout "Enter temperature in Fahrenheit " ; cin >> F;
        C = (F - 32) * 5/9;
        K = (F + 459.67) * 5/9;  
        cout   "Celsius = " C endl;    
        cout   "Kelvin = " K endl;       
        break;
    case 'K':
    case 'k':
        cout "Enter temperature in Kelvin " ; cin >> K;
        C = K - 273.15;
        F = K    * 9/5 - 459.67;
        cout   "Celsius = " C endl;    
        cout   "Fahrenheit = " F endl;    
        break;
    case 'C':
    case 'c':
        cout "Enter temperature in Celsius " ; cin >> C;
        F = C * 9/5 + 32;
        K = C + 273.15;
        cout   "Fahrenheit = " F endl;    
        cout   "Kelvin = " K endl;    
        break;     
    default: cout "Enter a valid unit \n";
}
}

int main()
{

cout "*************Temperature Conversion Calculator*************" endl endl;
cout "Please enter the temperature unit for which you want the conversion" endl;
cout "1. F for Fahrenheit to Celsius and Kelvin \n";
cout "2. C for Celcius to Fahrenheit and Kelvin \n";
cout "3. K for Celsius and Fahrenheit \n";

selection();
do
{
    cout "Do you want to continue (y/n) " ; cin >> start;
    if (start =='y') {selection();}
}
while(start == 'y');

 system("pause");
}

#include<iostream>
#include<conio.h>
using namespace std;
main()
{
float a,b,c;
char i,select;


cout"*************Temprature Conversion Caculator*************"endl;
cout"Please enter the temprature unit for which you want the conversion"endl;
cout"1. F for fahrenheit to celcius and kelvin"endl;
cout"2. C for celcius to farenheit and kelvin"endl;
cout"3. K for celcius and fahrenheit"endl;
coutendl;
do
{

cout"Please enter your option:"endl;
cin>>i;
switch(i)
{
case'C':
case'c':
{
cout"Enter the Temperature in Celsius:"endl;
cin>>a;
b=1.8*a+32.0;
c=a+273;
cout"Temperature in Fahrenheit is "bendl;
cout"Temperature in Kelvin is "cendl;

break;
}
case'F':
case'f':
{
cout"Enter the Temperature in Fahrenheit:";
cin>>b;
a=(b-32.0)/1.8;
c=(b+459.67)*5/9;
cout"Temperature in Celsius is "aendl;
cout"Temprature in Kelvin is"cendl;

break;
}
case 'k':
case 'K':
{
cout"Enter the temprature in kelvin:";
cin>>c;
b=c-459.67*9/5;
a=c-273.15;
cout"Temprature in Fahrenheit is"bendl;;
cout"Temprature in Celcius is"aendl;

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

}

Dear All,

Most of the solutions have not done following things:

  • Repetition Structures (Loops)
  • indented and well commented

So do the above things in your assignments.

Dear All,

This is my suggestion only.

The Dev C++ version for x86/32 bit windows shared in LMS is beta version.

You can use the other version 5.4.2 It is stable and fast. If you need any help regarding this version he/she can contact me.

Regards,

J

RSS

Latest Activity

stylo liked stylo's discussion entazar
1 minute ago
Babar ali updated their profile
3 minutes ago
+ ! ! ! ! ! AaiMa AnsaRi liked + M.Tariq Malik's group MGT211 Introduction To Business
8 minutes ago
Purple Work replied to + M.Tariq Malik's discussion MGT503 Assignment No 01 Fall 2019 Solution & Discussion in the group MGT503 Principles of Management
19 minutes ago
Rameesha joined + M.Tariq Malik's group
20 minutes ago
Rameesha replied to + M.Tariq Malik's discussion MGT211 GDB Fall 2019 Solution & Discussion in the group MGT211 Introduction To Business
21 minutes ago
Rameesha joined + M.Tariq Malik's group
22 minutes ago
ghazni replied to + M.Tariq Malik's discussion CS311 Assignment No 01 Fall 2019 Solution & Discussion Due Date: 15-11-2019 in the group CS311 Introduction to Web Services Development
24 minutes ago
ghazni joined + M.Tariq Malik's group
24 minutes ago
Rameesha posted a status
"Plz moje b reply kar do koi"
31 minutes ago
ghazni left a comment for Nabeel Ahmed
32 minutes ago
+++ Little ChAmp=== updated their profile
33 minutes ago
Sana fatima replied to + M.Tariq Malik's discussion CS304 Assignment No 01 Fall 2019 Solution & Discussion in the group CS304 Object Oriented Programming
33 minutes ago
Rameesha replied to + M.Tariq Malik's discussion Criteria Required for Award Badges, Featured Members & Moderators
37 minutes ago
Rameesha posted a status
"Plz send me solution of assignment no 1 of mth202"
44 minutes ago
Rameesha commented on + M.Tariq Malik's page Past Papers
45 minutes ago
Hamza - BCS (6th) and Saleem Maheen are now friends
49 minutes ago
Rameesha liked Ayaat's profile
49 minutes ago
Rameesha left a comment for Ayaat
50 minutes ago
Uzma liked + M.Tariq Malik's group PSY101 Introduction to Psychology
52 minutes ago

© 2019   Created by + M.Tariq Malik.   Powered by

Promote Us  |  Report an Issue  |  Privacy Policy  |  Terms of Service