1
1
#include <iostream>
double Fah(double x) {
return (x-32)*5/9;
double Cel(double y) {
return (y*9/5)+32;
int main() {
double a, x, y;
cin >> a;
if (a==1) {
cin >> x;
else {
cin >> y;
return main();
}
Exercise 2
#include <iostream>
return x - a;
return x + b;
int main() {
double x, y, a, b;
char d;
do {
cin >> x;
cin >> y;
if (y==1) {
cout << "How much money would you like to withdraw from your account?" << endl;
cin >> a;
cout << "Your new balance is: " << myNum1 << endl;
}
else if (y==2) {
cout << "How much money would you like to deposit from your account?" << endl;
cin >> b;
cout << "Your new balance is: " << myNum2 << endl;
else {
cout << "Thank you for using the system!" << endl;
cout << "Would you like to do another transaction ('Y' if Yes/ 'N' if No)" << endl;
cin >> d;
cout << "Thank you for using this system!" << endl;
return 0;