Questions tagged [unit-conversion]
Code whose primary purpose is to convert quantities from one system of measurement to another
16
questions
23
votes
4
answers
2k
views
Celsius → Fahrenheit conversion table
It's harder to do than criticize. Here's my attempt to implement a Celsius-to-Fahrenheit conversion table in C++.
...
14
votes
5
answers
5k
views
Temperature unit conversion (C,F,K) in C++ - follow-up
Link to my first question:
Converting Celsius and Fahrenheit in C++
I've improved my code, following @Jamal's recommendations. I hope I did everything right. The only thing I didn't get was putting ...
9
votes
8
answers
4k
views
Temperature conversion application
I'm two months in a programming course and our instructor told us we should think about building real-world applications as to gain valuable experience. I got the idea of doing a simple temperature ...
14
votes
3
answers
6k
views
Python 3 - simple temperature program
I have been teaching myself Python (as well as Tkinter) and today one of the sites I was reading, asked us to write a program to covert one value from Fahrenheit to Celsius, once - an easy three line ...
12
votes
4
answers
4k
views
Temperature conversion code
I am currently creating a program that can convert different units of measurement for temperature. It includes conversions for Celsius, Fahrenheit, kelvin and gas mark. Can someone tell me how I could ...
10
votes
9
answers
2k
views
Simple temperature converter in C
I have just begun to learn the C language and wanted to start off small with a temperature conversion calculator. The program works, and I'm looking for feedback on do's and don'ts as I am sure there ...
8
votes
2
answers
3k
views
Fahrenheit and Celsius converter in Rust
I made a program that converts between Celsius and Fahrenheit. Is there any way that I could make this code more efficient and cleaner?
...
7
votes
2
answers
3k
views
Simple OOP currency converter
I am learning about OOP so it would be great if you can give me feedback on how to improve my code and OOP design.
This is a currency converter. Firstly, it will call a method to add 2 currencies and ...
7
votes
4
answers
7k
views
Currency converter using MVC pattern in C++ & QT
While understanding the MVC pattern, I came across this particular article. I thought to implement it using the C++/QT library.
The intent over here is to implement/use MVC concepts in correct way. ...
6
votes
3
answers
3k
views
Fahrenheit / Celsius temperature converter
This is a simple bash script (hopefully with a little style as well) for converting temperatures from Fahrenheit to Celsius and vice versa.
...
6
votes
1
answer
949
views
Converting Celsius and Fahrenheit in C++
I've made my first little program written in C++ and was wondering if anyone could evaluate it and suggest some improvements. No copy paste. I was wondering if I can do something with my little ...
6
votes
4
answers
1k
views
Bytes to binary conversion function
I created a quick function to convert n bytes into binary for my student.
She is not on that level yet, but I think it would be best for her if my demonstrative ...
4
votes
2
answers
1k
views
Temperature value converter
I'm trying to improve my programming skills (not just using one language). I don't have a group of other programmers to bounce ideas off other than on the web - so please forgive me if I have posted ...
4
votes
1
answer
97
views
SI type safe unit calculations
I wrote a small type-rich MKS Unit system for the consistent and safe calculation of physical units in everyday use.
I realized some operators' implementations via the Barton-Nackman trick while ...
3
votes
2
answers
266
views
Simple OOP currency converter - follow-up
This is a follow up question on this post
This is what I changed on my previous code:
I use Exchanger and PairCurrency class ...
2
votes
0
answers
55
views
SI type safe unit calculations (revised)
This is the continuation of the questions raised in this thread
I did include the improvements that were mentioned but still feel like, I do more copies than I need to. Also I am unsure about the ...