Skip to content

Instantly share code, notes, and snippets.

@chernyshev-alex
Created May 18, 2021 20:04
Show Gist options
  • Save chernyshev-alex/40beb4d89618012f4bc024550ec196f6 to your computer and use it in GitHub Desktop.
Save chernyshev-alex/40beb4d89618012f4bc024550ec196f6 to your computer and use it in GitHub Desktop.
7. for (int i =0; i < 8; i++) {
println("urodzielem sie dnia " + call_function_from_item_4())
}
8. // I took formula from here
// https://www.cdc.gov/nccdphp/dnpao/growthcharts/training/bmiage/page5_1.html#:~:text=With%20the%20metric%20system%2C%20the,by%2010%2C000%2C%20can%20be%20used.
float calc_bmi(weight_kg, height_cm int)
return (10,000 * weight_kg / (height_cm * height_cm))
}
// something like this. I don't remember specific C++ functions
// but you can adopt this. Main idea is clear i hope :)
println("100 kg for 175 cm then BMP is " + std::to_string(calc_bmi( 100, 175 ))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment