Advertisement
heimsventus

Daillies 2 BMI

Jan 22nd, 2017
135
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.59 KB | None | 0 0
  1. // ConsoleApplication17.cpp : Defines the entry point for the console application.
  2.  
  3. //
  4.  
  5. #include "stdafx.h"
  6.  
  7. #include <iostream>
  8.  
  9. #include <string>
  10.  
  11. #include <cmath>
  12.  
  13. using namespace std;
  14.  
  15. int main()
  16.  
  17. {
  18.  
  19. double weight;
  20.  
  21. double height;
  22.  
  23. double height2 = (height*.025);
  24.  
  25. cout << "enter in weight " << endl;
  26.  
  27. cin >> weight;
  28.  
  29. cout << "enter in height" << "\n";
  30.  
  31. cin >> height;
  32.  
  33. double calcweight = (weight*.45);
  34.  
  35. double calcheight = pow(height2, 2);
  36.  
  37. double bmi = (calcweight / calcheight);
  38.  
  39. cout << "your bmi is " << bmi << "." << endl;
  40.  
  41. system("pause");
  42.  
  43. return 0;
  44.  
  45. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement