#include <iostream>
using namespace std;
int main( )
{
float rand, cent, pounds, shillings;
cout << "Enter Pounds " << endl;
cin >> pounds;
cout << "Enter Shillings " << endl;
cin >> shillings;
pounds =1;
shillings =1;
// enter amount while both pounds and shillings is not equal to 0
while
(pounds != 0 && shillings != 0)
{
cout << "Enter Pounds " << endl;
cin >> pounds;
cout << "Enter Shillings " << endl;
cin >> shillings;
// Calculate & convert pounds to rands
rand = (pounds * 2 );
// Calculate & convert shillings to cent
cent = (shillings * 10);
cout << "The pound is equal to R "<<rand << endl;
cout <<"Shillings equells to "<< cent << " C "<< endl;
}
return 0;
}
loeto 0 Newbie Poster
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
loeto 0 Newbie Poster
VernonDozier 2,218 Posting Expert Featured Poster
loeto 0 Newbie Poster
VernonDozier 2,218 Posting Expert Featured Poster
loeto 0 Newbie Poster
VernonDozier 2,218 Posting Expert Featured Poster
Ancient Dragon 5,243 Achieved Level 70 Team Colleague Featured Poster
loeto 0 Newbie Poster
VernonDozier 2,218 Posting Expert Featured Poster
loeto 0 Newbie Poster
Be a part of the DaniWeb community
We're a friendly, industry-focused community of developers, IT pros, digital marketers, and technology enthusiasts meeting, networking, learning, and sharing knowledge.