Advertisement
Guest User

Untitled

a guest
Feb 27th, 2020
95
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.94 KB | None | 0 0
  1. // Project_4.cpp : This file contains the 'main' function. Program execution begins and ends there.
  2. //
  3.  
  4. #include <iostream>
  5. #include <iomanip>
  6. using namespace std;
  7.  
  8. // Name: Wallace Wu
  9. // Course: ECE1310-04
  10. // Assignment: Project 4
  11. // Due Date: 2/27/20
  12. // Description: This project will familiarize us with using loops and setprecision.
  13.  
  14. int main()
  15. {
  16. int ftype;
  17. int M;
  18. cout << "WALLACE WU" << endl;
  19. cout << endl;
  20. // Step 1
  21. cout << "Step 1:" << endl;
  22. cout << "Enter format type 1 (fixed) 2 (scientific) 3 (default) : ";
  23. cin >> ftype;
  24.  
  25. cout << "Enter setprecision value M: ";
  26. cin >> M;
  27.  
  28.  
  29. int x1, x2, y1, y2;
  30. // Step 2
  31. cout << "Step 2:" << endl;
  32. cout << "enter x1, y1, x2, y2: ";
  33. cin >> x1 >> y1 >> x2 >> y2;
  34. cout << "y = ";
  35.  
  36.  
  37.  
  38. // Step 3
  39. int stepsize;
  40. int N;
  41. cout << "Step 3:" << endl;
  42. cout << "enter N: ";
  43. cin >> N;
  44. cout << "step_size = " << stepsize;
  45.  
  46.  
  47.  
  48.  
  49. system("pause");
  50. return 0;
  51. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement