Created
January 19, 2019 14:35
-
-
Save AungWinnHtut/64c8c918f90ae38b785b5ef5a9d3edc3 to your computer and use it in GitHub Desktop.
first cpp program
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#include<iostream> | |
#include<conio.h> | |
using namespace std; | |
int funArea(); | |
int main() | |
{ | |
float gold_weight_in_kyat, kyat, pae, yway, total_gold_price,one_kyat_price; | |
cout<<"pls enter one kyat price "; | |
cin>>one_kyat_price; | |
cout<<"pls enter kyat "; | |
cin>>kyat; | |
cout<<"pls enter pae "; | |
cin>>pae; | |
cout<<"pls enter yway "; | |
cin>>yway; | |
gold_weight_in_kyat = kyat + (pae/16) + (yway / (8*16)); | |
total_gold_price = one_kyat_price * gold_weight_in_kyat; | |
cout<<"gold weight is "<<gold_weight_in_kyat<<" kyats"<<endl; //end of line - endl | |
cout<<"gold price is "<<total_gold_price<<" kyats"<<endl; //end of line - endl | |
_getch();//get a character | |
return 0; | |
} | |
int funArea() | |
{ | |
float A,B,H; | |
cout<<"Please Enter B "; | |
cin>>B; | |
cout<<"Please Enter H "; | |
cin>>H; | |
A = B*H; | |
cout<<"The Area is "<<A; | |
_getch();//get a character | |
return 0; | |
} | |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment