Advertisement
Guest User

Untitled

a guest
Jun 23rd, 2017
53
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.61 KB | None | 0 0
  1. #include <iostream>
  2. #include <math.h>
  3. #include <string>
  4. using namespace std;
  5.  
  6. int main ()
  7.  
  8. {
  9. double u, v;
  10. string str;
  11.  
  12. cout << "Line 1: 2 to the power of 6 = " << pow (2,6) << endl;
  13. u = 12.5;
  14. v = 3.0;
  15.  
  16. cout << "Line 4: " << u << "to the power of " << v << " = " << pow (u, v) << endl;
  17. cout << "Line 5: Square root of 24 = " << sqrt (24.0) << endl;
  18.  
  19. u = pow(8.0, 2.5);
  20. cout << "Line 7: u = " << u << endl;
  21. str = "Programming with C++";
  22. cout << "Line 9: Length of str = " << str.length () << endl;
  23.  
  24.  
  25.  
  26.  
  27. system("PAUSE");
  28.  
  29. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement