Advertisement
ninepintcoggie

tuple1

Feb 16th, 2015
164
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 1.20 KB | None | 0 0
  1. #include <iostream>
  2. #include <iomanip>
  3.  
  4. using namespace std;
  5.  
  6. char count = '0';
  7.  
  8. void tuple3(char start, char end)
  9. {
  10. char count = start;
  11. char count3 = start;
  12. for (count3 = start; count3 <= end; count3 ++)
  13. {
  14. // cout << count << count2 << endl;
  15. }
  16. }
  17.  
  18. void tuple2(char start, char end)
  19. {
  20. char count = start;
  21. char count2 = start;
  22. for (count2 = start; count2 <= end; count2 ++)
  23. {
  24. // cout << count << count2 << endl;
  25. }
  26. }
  27.  
  28. void tuple1(char start, char end)
  29. //first digit tuple
  30. {
  31. char count = start;
  32. for (count = start; count <= end; count ++)
  33. {
  34. char count2 = start;
  35. for (count2 = start; count2 <= end; count2 ++)
  36. {
  37. char count3 = start;
  38. for (count3 - start; count3 <= end; count3++)
  39. {
  40. cout << count << count2 << count3 << endl;
  41. }
  42. }
  43. tuple2 (count, end);
  44. }
  45. }
  46.  
  47. //two nested loops for question 4
  48. int main ()
  49. {
  50. char start, end, size;
  51.  
  52. cout << "Start?" << endl;
  53. cin >> start;
  54. cout << start << " confirmed" << endl;
  55. cout << "End?" << endl;
  56. cin >> end;
  57. cout << end << " confirmed" << endl;
  58. cout << "Tuple size?" << endl;
  59. cin >> size;
  60. cout << "Tuple size " << size << " confirmed" << endl;
  61.  
  62.  
  63. tuple1(start, end);
  64. return 0;
  65. }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement