Advertisement
Guest User

Untitled

a guest
Jul 21st, 2017
52
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
C++ 0.50 KB | None | 0 0
  1. // Program: Lab03.cpp
  2. // Filename: Lab03.cpp
  3. // Author: Marilyn
  4. //Due Date: 11 Feb 2011
  5. // Description: Lab 03
  6.  
  7. #include "stdafx.h"
  8. #include <iostream>
  9. #include <string>
  10.  
  11. using namespace std;
  12.  
  13. int main()
  14. {
  15. int i=0;
  16. int x;
  17. cout << "Enter the number you would like to square:";
  18. cin >> x;
  19.  
  20. for (;i=x*x;)
  21.  
  22. cout << "Enter the number you would like to cube:";
  23. cin >> x;
  24.  
  25. for (;i=x*x*x;)
  26.  
  27. {
  28. cout << " i= " << i << endl;
  29.  
  30. }
  31.  
  32. cout << "after the loop i = " << i << endl;
  33.  
  34.  
  35.  
  36. return 0;
  37. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement