Skip to content

Commit

Permalink
Fix kg conversion
Browse files Browse the repository at this point in the history
  • Loading branch information
SyafaHadyan committed Oct 11, 2023
1 parent da003cc commit 0b42dbe
Showing 1 changed file with 12 additions and 0 deletions.
12 changes: 12 additions & 0 deletions src/main.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -160,6 +160,18 @@ int main()
cout << "Ton" << ":" << " " << weight * 0.00000110231 << endl;
cout << "Stone" << ":" << " " << weight * 0.000157473 << endl;
}
else if (convert == "KG")
{
input_weight();

newline();
cout << "Milligram" << ":" << " " << weight * 1000000 << endl;
cout << "Gram" << ":" << " " << weight * 1000 << endl;
cout << "Ounce" << ":" << " " << weight * 35.27396195 << endl;
cout << "Pound" << ":" << " " << weight * 0.45359237 << endl;
cout << "Ton" << ":" << " " << weight / 1000 << endl;
cout << "Stone" << ":" << " " << weight * 0.071428579 << endl;
}
else if (convert == "OZ")
{
input_weight();
Expand Down

0 comments on commit 0b42dbe

Please sign in to comment.