Virtual University VU Solved Assignments/Quizzes/GDBs, Past Solved Papers/Assignments/Online Quizzes Solutions.

Saturday, April 24, 2010

Useful books of courses

http://www.2shared.com/file/12789271/6170d50e/Blackwell_Encyclopedic_Diction.html
http://www.2shared.com/file/12789288/9f347165/Economics__Recomended_Book___V.html
http://www.2shared.com/file/12789295/f89e3c99/Entreprneursship__VUsolutionsb.html
http://www.2shared.com/file/12789301/2ff329fe/FAQS__eco401___VUsolutionsblog.html
http://www.2shared.com/file/12789306/b197bc5d/Faqs_Cost_and_management_accou.html
http://www.2shared.com/file/12789352/cb8d8c01/financial_management__VUsoluti.html
http://www.2shared.com/file/12789484/920f41fc/Financial_Management_Theory_an.html
http://www.2shared.com/file/12789488/9bb90dd7/Glossary__VUsolutionsblogspotc.html
http://www.2shared.com/file/12789494/8b1470bd/Glossary_OF_FM__VUsolutionsblo.html
http://www.2shared.com/file/12789512/ab6c35b7/Overview_of_Financial_Manageme.html
http://www.2shared.com/file/12789540/3815a0de/Shaum23__VUsolutionsblogspotco.html
http://www.2shared.com/file/12789576/fa5b5628/Strategic_Management__VUsoluti.html
http://www.2shared.com/file/12789907/cb07091d/slides_of_James_Van_Horne_and_.html
http://www.2shared.com/file/12790221/5c6f4771/The_Economics_of_Money_Banking.html
http://www.2shared.com/file/12790233/ab7a171c/van_horne_instructors_fm__VUso.html
http://www.2shared.com/file/12790331/44b61c07/Blackwell_Encyclopedic_Diction.html
http://www.2shared.com/file/12790353/fce2daad/Economics__Recomended_Book___V.html
http://www.2shared.com/file/12790357/fb8f1eb4/Entreprneursship__VUsolutionsb.html
http://www.2shared.com/file/12790361/39c1e842/FAQS__eco401___VUsolutionsblog.html
http://www.2shared.com/file/12790364/49ab1ccd/Faqs_Cost_and_management_accou.html
http://www.2shared.com/file/12790411/73cf6800/financial_management__VUsoluti.html
http://www.2shared.com/file/12790527/b043f4c1/Financial_Management_Theory_an.html
http://www.2shared.com/file/12790535/4756a4ac/Glossary__VUsolutionsblogspotc.html
http://www.2shared.com/file/12790541/f7af672/Glossary_OF_FM__VUsolutionsblo.html
http://www.2shared.com/file/12790559/18ba4f01/Overview_of_Financial_Manageme.html
http://www.2shared.com/file/12790630/357aee7a/Production__Operation_Manageme.html
http://www.2shared.com/file/12790661/3f0a2aa9/Shaum23__VUsolutionsblogspotco.html

Useful books of courses

http://www.2shared.com/file/12789271/6170d50e/Blackwell_Encyclopedic_Diction.html
http://www.2shared.com/file/12789288/9f347165/Economics__Recomended_Book___V.html
http://www.2shared.com/file/12789295/f89e3c99/Entreprneursship__VUsolutionsb.html
http://www.2shared.com/file/12789301/2ff329fe/FAQS__eco401___VUsolutionsblog.html
http://www.2shared.com/file/12789306/b197bc5d/Faqs_Cost_and_management_accou.html
http://www.2shared.com/file/12789352/cb8d8c01/financial_management__VUsoluti.html
http://www.2shared.com/file/12789484/920f41fc/Financial_Management_Theory_an.html
http://www.2shared.com/file/12789488/9bb90dd7/Glossary__VUsolutionsblogspotc.html
http://www.2shared.com/file/12789494/8b1470bd/Glossary_OF_FM__VUsolutionsblo.html
http://www.2shared.com/file/12789512/ab6c35b7/Overview_of_Financial_Manageme.html
http://www.2shared.com/file/12789540/3815a0de/Shaum23__VUsolutionsblogspotco.html
http://www.2shared.com/file/12789576/fa5b5628/Strategic_Management__VUsoluti.html
http://www.2shared.com/file/12789907/cb07091d/slides_of_James_Van_Horne_and_.html
http://www.2shared.com/file/12790221/5c6f4771/The_Economics_of_Money_Banking.html
http://www.2shared.com/file/12790233/ab7a171c/van_horne_instructors_fm__VUso.html
http://www.2shared.com/file/12790331/44b61c07/Blackwell_Encyclopedic_Diction.html
http://www.2shared.com/file/12790353/fce2daad/Economics__Recomended_Book___V.html
http://www.2shared.com/file/12790357/fb8f1eb4/Entreprneursship__VUsolutionsb.html
http://www.2shared.com/file/12790361/39c1e842/FAQS__eco401___VUsolutionsblog.html
http://www.2shared.com/file/12790364/49ab1ccd/Faqs_Cost_and_management_accou.html
http://www.2shared.com/file/12790411/73cf6800/financial_management__VUsoluti.html
http://www.2shared.com/file/12790527/b043f4c1/Financial_Management_Theory_an.html
http://www.2shared.com/file/12790535/4756a4ac/Glossary__VUsolutionsblogspotc.html
http://www.2shared.com/file/12790541/f7af672/Glossary_OF_FM__VUsolutionsblo.html
http://www.2shared.com/file/12790559/18ba4f01/Overview_of_Financial_Manageme.html
http://www.2shared.com/file/12790630/357aee7a/Production__Operation_Manageme.html
http://www.2shared.com/file/12790661/3f0a2aa9/Shaum23__VUsolutionsblogspotco.html

Wednesday, April 21, 2010

Mkt630 GDB Solution

Being a marketing student, yes I agree with this statement, because going globally is pushing your business globally. In ever-changing world, there is necessity of going globally in order to compete with the competitors.


There are many factors that should be kept in mind before going globally. In today’s modern age going globally is very important to compete in a well manner and to take competitive advantage. Going globally is simple as setting up of a Website for market to goods and services. The information and goods are moving at a higher speed than before, so it is necessity of today's businesses.

Mkt630 GDB Solution

Being a marketing student, yes I agree with this statement, because going globally is pushing your business globally. In ever-changing world, there is necessity of going globally in order to compete with the competitors.


There are many factors that should be kept in mind before going globally. In today’s modern age going globally is very important to compete in a well manner and to take competitive advantage. Going globally is simple as setting up of a Website for market to goods and services. The information and goods are moving at a higher speed than before, so it is necessity of today's businesses.

CS507 Assignment

IDEA Solution

Click image for FULL VIEW




Information System (CS507)
Spring 2010
Assignment No. 1

Due Date:
Your assignment must be uploaded/submitted before or on 27th April 2010.

Max Marks: 20

Uploading instructions:
Please view the Assignment Submission Process document provided to you by the Virtual University for uploading assignments.

o The assignment should be in .doc format.
o Save your assignment with your ID (e.g. bx020200786.doc).
o The assignment submission through email is highly discouraged.

Rules for Marking:
It should be clear that your assignment will not get any credit if:

o The assignment is submitted after due date.
o The submitted assignment file is corrupted.
o The assignment is copied.
o The assignment material is directly copied from internet.

Note:
Your answer must follow the below given specifications. You will be assigned no marks if you do not follow these instructions.

• Font style: “Times New Roman”
• Font color: “Black”
• Font size: “12”
• Bold for heading only.
• Font in Italic is not allowed at all.


Q. 1: How can you describe information in its ideal form? Moreover how ideal information would help us regarding decision making in our routine activities?
(Marks: 10)

Q. 2: Identify and explain different decision making approaches.
(Marks: 10)






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








CS507 Assignment

IDEA Solution

Click image for FULL VIEW




Information System (CS507)
Spring 2010
Assignment No. 1

Due Date:
Your assignment must be uploaded/submitted before or on 27th April 2010.

Max Marks: 20

Uploading instructions:
Please view the Assignment Submission Process document provided to you by the Virtual University for uploading assignments.

o The assignment should be in .doc format.
o Save your assignment with your ID (e.g. bx020200786.doc).
o The assignment submission through email is highly discouraged.

Rules for Marking:
It should be clear that your assignment will not get any credit if:

o The assignment is submitted after due date.
o The submitted assignment file is corrupted.
o The assignment is copied.
o The assignment material is directly copied from internet.

Note:
Your answer must follow the below given specifications. You will be assigned no marks if you do not follow these instructions.

• Font style: “Times New Roman”
• Font color: “Black”
• Font size: “12”
• Bold for heading only.
• Font in Italic is not allowed at all.


Q. 1: How can you describe information in its ideal form? Moreover how ideal information would help us regarding decision making in our routine activities?
(Marks: 10)

Q. 2: Identify and explain different decision making approaches.
(Marks: 10)






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








Tuesday, April 20, 2010

CS101 solution

Question No. 1
Ali is a manager in a multi-national organization. As part of his job, he needs to interact and provide updates of his work to the head office on regular basis, which input/output devices can he use to complete his daily tasks? (Marks 2)

Answer:-

Input:
1-Keyboard
2-Webcam
3-Mouse
4-Microphone
5-Scanner

Output:
1-Printer
2-Monitor
3-Speakers



Question No. 2
How WebPages are different from a website? (Marks 2)
Note: List down two most important differences in this regard.

Answer:-
A website is a collection of one or more web pages designed to convey information on a particular subject or theme to a web user. (e.g. a company will have a web site providing structured information about the company, designed to inform particular groups of its stakeholders - investors, customers, technical support, sales, employment, news items etc.)
A web page is one screen full of information (from a web site) that may contain links to other pages in the web site or links to external information. The web page will normally be written as (or rendered as) an HTML document






CS101 solution

Question No. 1
Ali is a manager in a multi-national organization. As part of his job, he needs to interact and provide updates of his work to the head office on regular basis, which input/output devices can he use to complete his daily tasks? (Marks 2)

Answer:-

Input:
1-Keyboard
2-Webcam
3-Mouse
4-Microphone
5-Scanner

Output:
1-Printer
2-Monitor
3-Speakers



Question No. 2
How WebPages are different from a website? (Marks 2)
Note: List down two most important differences in this regard.

Answer:-
A website is a collection of one or more web pages designed to convey information on a particular subject or theme to a web user. (e.g. a company will have a web site providing structured information about the company, designed to inform particular groups of its stakeholders - investors, customers, technical support, sales, employment, news items etc.)
A web page is one screen full of information (from a web site) that may contain links to other pages in the web site or links to external information. The web page will normally be written as (or rendered as) an HTML document






Mth302 solution

Question 1:

Basic Salary of John is 2000$ per month. According to his job contract his allowances are some percentage of basic salary whereas other benefits are percentage of Gross Salary. Details of his benefits are as follows. What percent of Basic/Gross salary are these benefits? (Show the calculations).
Marks 10

BENEFITS $ Percent of Basic/Gross Salary
House Rent 900 House Rent = 45 %= 0.45*2000 = 900
Utilities Allowance 200 Utilities allowance = 2.5 %= 0.025*2000=50
Medical/Group insurance 155 insurance/medical=5% = 0.05*2000 = 100
Miscellaneous Social Charges 186 Misc. Social Charges=5.8% =0.058*2000=116


Question 2:
The price of oil decreased from $76 per barrel to $70 per barrel. What is the percentage change in oil prices?
Solution:
Change = Final value – initial value
// = 76 – 70
//= 6
Percentage change = (Change / initial value) x 100%
Initial value =76$
Final value = 70$
Change = 6
% Change = (6/76) x 100 = 7.8947%
Marks 5

Question 3:
Suppose you took loan from a bank of amount 800£ at 8% interest compounded semi-annually for three years. Find the compound interest.
Solution:
S = Money accrued after n years also called compound amount = ?
P = Principal= 800
r = Rate of interest= 8% = 0.08
n = Number of periods = 3*2= 6 years (Semi annually)
S = P(1 + r/2)^ n
Compound interest = S - P
S= P(1+0.08/2)^3*2
S= 800(1+0.04)^6
S=1012.255 Rs
Compound interest = S - P
Compound interest = 1012.255 – 800 = 212.255 Rs
Marks 5
Question 4:
Calculate the Accumulated Value if you deposit 500Rs at the end of each year for the next 3 years? Assume an interest of 8% compounded annually.

Solution:

Accumulated value of n period = payment per period × accumulation factor for n Periods
Accumulated value of n period = C × [(1+i)^n – 1]/i

C = Cash flow per period = 500
i = interest rate = 8% = 0.08
n = number of payments = 3

= C* [(1+i)^n – 1]/i
= 500* [(1+0.08)^3 – 1]/0.08
= 500* [(1.08)^3 – 1]/0.08
= 500* [1.259712 – 1]/0.08
= 500* [0.259712]/0.08
= 500* 3.2464
=1623.2

Accumulated value of n period = 500 × 3.2464
Accumulated value of n period = 1623.2


Marks 5

Mth302 solution

Question 1:

Basic Salary of John is 2000$ per month. According to his job contract his allowances are some percentage of basic salary whereas other benefits are percentage of Gross Salary. Details of his benefits are as follows. What percent of Basic/Gross salary are these benefits? (Show the calculations).
Marks 10

BENEFITS $ Percent of Basic/Gross Salary
House Rent 900 House Rent = 45 %= 0.45*2000 = 900
Utilities Allowance 200 Utilities allowance = 2.5 %= 0.025*2000=50
Medical/Group insurance 155 insurance/medical=5% = 0.05*2000 = 100
Miscellaneous Social Charges 186 Misc. Social Charges=5.8% =0.058*2000=116


Question 2:
The price of oil decreased from $76 per barrel to $70 per barrel. What is the percentage change in oil prices?
Solution:
Change = Final value – initial value
// = 76 – 70
//= 6
Percentage change = (Change / initial value) x 100%
Initial value =76$
Final value = 70$
Change = 6
% Change = (6/76) x 100 = 7.8947%
Marks 5

Question 3:
Suppose you took loan from a bank of amount 800£ at 8% interest compounded semi-annually for three years. Find the compound interest.
Solution:
S = Money accrued after n years also called compound amount = ?
P = Principal= 800
r = Rate of interest= 8% = 0.08
n = Number of periods = 3*2= 6 years (Semi annually)
S = P(1 + r/2)^ n
Compound interest = S - P
S= P(1+0.08/2)^3*2
S= 800(1+0.04)^6
S=1012.255 Rs
Compound interest = S - P
Compound interest = 1012.255 – 800 = 212.255 Rs
Marks 5
Question 4:
Calculate the Accumulated Value if you deposit 500Rs at the end of each year for the next 3 years? Assume an interest of 8% compounded annually.

Solution:

Accumulated value of n period = payment per period × accumulation factor for n Periods
Accumulated value of n period = C × [(1+i)^n – 1]/i

C = Cash flow per period = 500
i = interest rate = 8% = 0.08
n = number of payments = 3

= C* [(1+i)^n – 1]/i
= 500* [(1+0.08)^3 – 1]/0.08
= 500* [(1.08)^3 – 1]/0.08
= 500* [1.259712 – 1]/0.08
= 500* [0.259712]/0.08
= 500* 3.2464
=1623.2

Accumulated value of n period = 500 × 3.2464
Accumulated value of n period = 1623.2


Marks 5

Monday, April 19, 2010

Mgmt623 GDB solution

Question

"Discuss the role of leader in traditional organization and dynamic organization"

Solution:

Role of leader in traditional organization:-
The leadership role in traditional organizations includes leading others toward the attainment of an outcome, or realization of a vision of direct value to usually a third party someone other than either the leader or the followers. This type of leadership has become a profession and data copy from v and u new site say an important requisite for executives to succeed in their roles as managers in traditional organization. This leadership is like leadership in war, it is a war of competition that is fought in the market place using products, Technologies, Services and distribution channels as weapons.

Role of leader in dynamic organization:-
In Dynamic Organizations an endless source of practical insights and ideas where leaders are a line executive responsible for organizational performance or a human resources professional providing expert advice. Leaders must cooperate with their subordinates and provide them necessary informations regarding to projects. And making every necessary effort to make their organization strong to handle every type of danger. So, making their organization strong from insight is also important. And role of leaders will make this possible.The role of leader within organization is not complete just to convey their orders but also their participation is important Leader Behavior In the dynamic organization, the leader contributes to performance and satisfaction to a greater extent than in the hierarchical organization because in the dynamic organization the work is not so preplanned

Mgmt623 GDB solution

Question

"Discuss the role of leader in traditional organization and dynamic organization"

Solution:

Role of leader in traditional organization:-
The leadership role in traditional organizations includes leading others toward the attainment of an outcome, or realization of a vision of direct value to usually a third party someone other than either the leader or the followers. This type of leadership has become a profession and data copy from v and u new site say an important requisite for executives to succeed in their roles as managers in traditional organization. This leadership is like leadership in war, it is a war of competition that is fought in the market place using products, Technologies, Services and distribution channels as weapons.

Role of leader in dynamic organization:-
In Dynamic Organizations an endless source of practical insights and ideas where leaders are a line executive responsible for organizational performance or a human resources professional providing expert advice. Leaders must cooperate with their subordinates and provide them necessary informations regarding to projects. And making every necessary effort to make their organization strong to handle every type of danger. So, making their organization strong from insight is also important. And role of leaders will make this possible.The role of leader within organization is not complete just to convey their orders but also their participation is important Leader Behavior In the dynamic organization, the leader contributes to performance and satisfaction to a greater extent than in the hierarchical organization because in the dynamic organization the work is not so preplanned

Sunday, April 18, 2010

MKT621 GDB

Puffery has a common, a commercial, and a legal definition. Legally, the most significant characteristic of "puffery" is that it is a defense to a charge of misleading purchasers of goods, investments, of services, or to a charge that a promisor has made a legally cognizable promise. That defense, whether of not actually asserted by a commercial speaker, highlights the general rule that speech that misleads consumers is presumptively unlawful. Defendants in turn argue: "This speech, which would otherwise be unlawful because it is alleged to have misled consumption, could not have done so. It is puffery and should be immune from liability."

Applications of the puffery defense share two other telling characteristics. First, speech found to be puffery almost always seeks to encourage consumption, making optimistic claims about goods unsupported by observed reality. This is not to say that courts believe that sellers are never pessimistic about their products. Rather, they believe buyers will almost never actually buy because of misplaced seller pessimism: no one would purchase a car sold as "Not particularly zippy!" Second, the puffery defense is related to a particular model of consumption, in which purchase decisions are reasonably made based on facts revealed by sellers. Thus, across the law, judges and regulators look for false facts uttered by sellers as the touchstone of their analyses.

To explore these commonalities, I examine puffery defenses in four doctrinal contexts: federal false advertising; federal securities laws; the Uniform Commercial Code's warranty provisions; and the scope of a "promise" in the contract/tort claim of promissory estoppel. I chose these three areas, from the many in which the puffery defense appears, for a number of reasons. Most significantly, each area of law can be seen asa stop along a continuum from contract to tort law. As I explore in Part V of this Article, puffing speech presents an analogue to the externality problem most closely associated with tort law. II is interesting, therefore, to observe as I do in this Part that courts' analysis of puffery is less satisfying in those areas of law that look more like "torts" than "contracts."

HOW DO CONSUMERS RESPOND TO PUFFERY?

The constitutional status of puffery, as Part III demonstrated, is tied to courts’ shifting understanding of how consumption works. The Supreme Court and other legal authorities wish to encourage speech leading to “good” consumption and discourage speech leading to “bad” consumption, and they believe that the First Amendment’s speech-protecting role might essentially be consistent with that goal. Current doctrine depends, to a great degree, on intuitions vunew about the law’s ability to promote and to discourage commercial speech. Thus, jurists assume that if they were to prohibit puffery because puffery distorts consumption, then their intervention would be effective. This ’Part’s goal is, in part, to consider the realism of this assumption, utilizing traditional and heterodox economic approaches. In Section A, I show why economists believe that prohibitions on puffery and other forms of misleading speech will be ineffectual at best and possibly self-defeating. Section B continues the analysis by relaxing traditional assumptions about consumer rationality and discussing how evidence of optimism strengthens the case for immunizing puffing speech. These analyses together suggest that both the First Amendment analysis discussed in Part III and the existing puffery landscape detailed in Part II overestimate the law’s ability to change consumption behavior.

MKT621 GDB

Puffery has a common, a commercial, and a legal definition. Legally, the most significant characteristic of "puffery" is that it is a defense to a charge of misleading purchasers of goods, investments, of services, or to a charge that a promisor has made a legally cognizable promise. That defense, whether of not actually asserted by a commercial speaker, highlights the general rule that speech that misleads consumers is presumptively unlawful. Defendants in turn argue: "This speech, which would otherwise be unlawful because it is alleged to have misled consumption, could not have done so. It is puffery and should be immune from liability."

Applications of the puffery defense share two other telling characteristics. First, speech found to be puffery almost always seeks to encourage consumption, making optimistic claims about goods unsupported by observed reality. This is not to say that courts believe that sellers are never pessimistic about their products. Rather, they believe buyers will almost never actually buy because of misplaced seller pessimism: no one would purchase a car sold as "Not particularly zippy!" Second, the puffery defense is related to a particular model of consumption, in which purchase decisions are reasonably made based on facts revealed by sellers. Thus, across the law, judges and regulators look for false facts uttered by sellers as the touchstone of their analyses.

To explore these commonalities, I examine puffery defenses in four doctrinal contexts: federal false advertising; federal securities laws; the Uniform Commercial Code's warranty provisions; and the scope of a "promise" in the contract/tort claim of promissory estoppel. I chose these three areas, from the many in which the puffery defense appears, for a number of reasons. Most significantly, each area of law can be seen asa stop along a continuum from contract to tort law. As I explore in Part V of this Article, puffing speech presents an analogue to the externality problem most closely associated with tort law. II is interesting, therefore, to observe as I do in this Part that courts' analysis of puffery is less satisfying in those areas of law that look more like "torts" than "contracts."

HOW DO CONSUMERS RESPOND TO PUFFERY?

The constitutional status of puffery, as Part III demonstrated, is tied to courts’ shifting understanding of how consumption works. The Supreme Court and other legal authorities wish to encourage speech leading to “good” consumption and discourage speech leading to “bad” consumption, and they believe that the First Amendment’s speech-protecting role might essentially be consistent with that goal. Current doctrine depends, to a great degree, on intuitions vunew about the law’s ability to promote and to discourage commercial speech. Thus, jurists assume that if they were to prohibit puffery because puffery distorts consumption, then their intervention would be effective. This ’Part’s goal is, in part, to consider the realism of this assumption, utilizing traditional and heterodox economic approaches. In Section A, I show why economists believe that prohibitions on puffery and other forms of misleading speech will be ineffectual at best and possibly self-defeating. Section B continues the analysis by relaxing traditional assumptions about consumer rationality and discussing how evidence of optimism strengthens the case for immunizing puffing speech. These analyses together suggest that both the First Amendment analysis discussed in Part III and the existing puffery landscape detailed in Part II overestimate the law’s ability to change consumption behavior.

CS201 Solution

//AB
//Currency Exchange Programme
#include
using namespace std;
/*
1 Euro = 112 Rupees.

1 Dollar = 84 Rupees.

1 Euro = 1.33 Dollars

1 Dollar = 0.75 EUR*/

int main()
{
char myCur, convCur;
double myRupees(0), myEuros(0), myDollars(0);
double convertedAmount(0);
bool flag = false;
while(flag == false)
{
cout << "Welcome to the Currency Exchange Rate Program!" << endl << endl << endl;
cout << "Key Description\n" << endl;
cout << "R Pakistani Rupees" << endl;
cout << "E European Euro" << endl;
cout << "D American Dollar" << endl << endl;
while( myCur != 'R' && myCur != 'E' && myCur != 'D')
{
cout << "Please select the key for the currency you have: ";
cin >> myCur;
myCur = toupper(myCur);
if(myCur == 'R' )
{
cout << "Please enter the amount of Rupees you have: ";
cin >> myRupees;
}
else if(myCur == 'E')
{
cout << " Please enter the amount of Euros you have: ";
cin >> myEuros;
}
else if(myCur == 'D')
{
cout << "Please enter the amount of Dollars you have: ";
cin >> myDollars;
}
else
{
cout << "Please enter a valid key" << endl;
}
}

do{
cout << "Please select the key for the currency you want to convert to: ";
cin >> convCur;
convCur = toupper(convCur);
}while(myCur == convCur);

if (myCur == 'R' && convCur == 'E')
{
// 1 Euro = 112 Rupees.
convertedAmount = myRupees / 112;
}
if (myCur == 'R' && convCur == 'D')
{
//1 Dollar = 84 Rupees.
convertedAmount = myRupees / 84;
}
if (myCur == 'E' && convCur == 'R')
{
// 1 Euro = 112 Rupees.
convertedAmount = myEuros * 112;
}
if (myCur == 'E' && convCur == 'D')
{
// 1 Euro = 1.33 Dollars
convertedAmount = myEuros * 1.33;
}
if (myCur == 'D' && convCur == 'R')
{
//1 Dollar = 84 Rupees.
convertedAmount = myDollars * 84;
}
if(myCur == 'D' && convCur == 'E')
{
// 1 Euro = 1.33 Dollars
convertedAmount = myDollars / 1.33;
}

if(myCur == 'R')
{
cout << myRupees << " Rupees converted into ";
}
if(myCur == 'E')
{
cout << myEuros << " Euros converted into ";
}
if(myCur == 'D')
{
cout << myDollars << " Dollars converted into ";
}

if( convCur == 'R')
{
cout << convertedAmount << " Rupees" << endl;
}
if(convCur == 'E')
{
cout << convertedAmount << " Euros" << endl;
}
if(convCur == 'D')
{
cout << convertedAmount << " Dollars" << endl;
}

char answer;
cout << "\nWould you like to run another conversion? (y/n)" << endl;
cin >> answer;
answer = tolower(answer);
if (answer == 'n')
{
flag = true;
}
system("CLS");
myCur = '\0';
}
system("Pause");
return 0;
}

CS201 Solution

//AB
//Currency Exchange Programme
#include
using namespace std;
/*
1 Euro = 112 Rupees.

1 Dollar = 84 Rupees.

1 Euro = 1.33 Dollars

1 Dollar = 0.75 EUR*/

int main()
{
char myCur, convCur;
double myRupees(0), myEuros(0), myDollars(0);
double convertedAmount(0);
bool flag = false;
while(flag == false)
{
cout << "Welcome to the Currency Exchange Rate Program!" << endl << endl << endl;
cout << "Key Description\n" << endl;
cout << "R Pakistani Rupees" << endl;
cout << "E European Euro" << endl;
cout << "D American Dollar" << endl << endl;
while( myCur != 'R' && myCur != 'E' && myCur != 'D')
{
cout << "Please select the key for the currency you have: ";
cin >> myCur;
myCur = toupper(myCur);
if(myCur == 'R' )
{
cout << "Please enter the amount of Rupees you have: ";
cin >> myRupees;
}
else if(myCur == 'E')
{
cout << " Please enter the amount of Euros you have: ";
cin >> myEuros;
}
else if(myCur == 'D')
{
cout << "Please enter the amount of Dollars you have: ";
cin >> myDollars;
}
else
{
cout << "Please enter a valid key" << endl;
}
}

do{
cout << "Please select the key for the currency you want to convert to: ";
cin >> convCur;
convCur = toupper(convCur);
}while(myCur == convCur);

if (myCur == 'R' && convCur == 'E')
{
// 1 Euro = 112 Rupees.
convertedAmount = myRupees / 112;
}
if (myCur == 'R' && convCur == 'D')
{
//1 Dollar = 84 Rupees.
convertedAmount = myRupees / 84;
}
if (myCur == 'E' && convCur == 'R')
{
// 1 Euro = 112 Rupees.
convertedAmount = myEuros * 112;
}
if (myCur == 'E' && convCur == 'D')
{
// 1 Euro = 1.33 Dollars
convertedAmount = myEuros * 1.33;
}
if (myCur == 'D' && convCur == 'R')
{
//1 Dollar = 84 Rupees.
convertedAmount = myDollars * 84;
}
if(myCur == 'D' && convCur == 'E')
{
// 1 Euro = 1.33 Dollars
convertedAmount = myDollars / 1.33;
}

if(myCur == 'R')
{
cout << myRupees << " Rupees converted into ";
}
if(myCur == 'E')
{
cout << myEuros << " Euros converted into ";
}
if(myCur == 'D')
{
cout << myDollars << " Dollars converted into ";
}

if( convCur == 'R')
{
cout << convertedAmount << " Rupees" << endl;
}
if(convCur == 'E')
{
cout << convertedAmount << " Euros" << endl;
}
if(convCur == 'D')
{
cout << convertedAmount << " Dollars" << endl;
}

char answer;
cout << "\nWould you like to run another conversion? (y/n)" << endl;
cin >> answer;
answer = tolower(answer);
if (answer == 'n')
{
flag = true;
}
system("CLS");
myCur = '\0';
}
system("Pause");
return 0;
}