#include #include float bmiFunktion(float length, float kg, float tot); // Min funktion using namespace std; struct varde{ float kg; float length; float tot; }; int main() { varde total; cout << "Ange hur lång du är:___\b\b\b"; cin >> total.length; cout << "Ok. Du är " << total.length << "."<< endl; cout << "Ange din vikt:__\b\b"; cin >> total.kg; bmiFunktion(total.length, total.kg, total.tot); // Sänder variablernas värde till min funktion return 0; } float bmiFunktion(float length, float kg, float tot) { tot = kg / (length * length); // Hit sänds värderna från main och behandlas för att räkna ut BMI cout << "Ditt BMI-värde är: " << tot << "\n"; // Output här }