All pastes #915522 Raw Edit

Mine

public cpp v1 · immutable
#915522 ·published 2008-02-23 21:31 UTC
rendered paste body
#include <iostream>#include <cstdlib>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         }