Skip to content

Instantly share code, notes, and snippets.

@AungWinnHtut
Created January 19, 2019 14:35
Show Gist options
  • Save AungWinnHtut/64c8c918f90ae38b785b5ef5a9d3edc3 to your computer and use it in GitHub Desktop.
Save AungWinnHtut/64c8c918f90ae38b785b5ef5a9d3edc3 to your computer and use it in GitHub Desktop.
first cpp program
#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