Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include<iostream>
- #include<cstdlib> //stdlib.h
- using namespace std; //cout,cin,endl -> std::
- float calculateArea(float l, float w); //fun declare
- int calculateGoldPrice(int kyat, int pae, int yway, int currentGoldPrice);
- int main()
- {
- int ans = 0;
- while (ans != 3)
- {
- system("cls");
- cout << "Menu System" << endl;
- cout << " 1-Calculate Area" << endl;
- cout << " 2-Calculate Gold Price" << endl;
- cout << " 3-Exit" << endl;
- cout << " Choose 1,2,3: ";
- cin >> ans;
- if (ans == 1) {
- cout << "Area calculation" << endl;
- calculateArea(11, 22);
- }
- else if (ans == 2)
- {
- cout << "Gold price calculation" << endl;
- calculateGoldPrice(1, 2, 3, 6000000);
- }
- else if (ans == 3) {
- cout << "Bye" << endl;
- exit(0);
- }
- else {
- cout << "Invalid input, choose 1,2,3 only!" << endl;
- }
- system("pause");
- }
- return 0;
- }
- float calculateArea(float l, float w) //fun definition
- {
- float a = 0.0F;
- a = l * w;
- return a;
- }
- int calculateGoldPrice(int kyat, int pae, int yway, int currentGoldPrice)
- {
- int totalGoldPrice = 0.0;
- //calculate it
- return totalGoldPrice;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement