Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- #include <iostream>
- #include <iomanip>
- using namespace std;
- char count = '0';
- void tuple3(char start, char end)
- {
- char count = start;
- char count3 = start;
- for (count3 = start; count3 <= end; count3 ++)
- {
- // cout << count << count2 << endl;
- }
- }
- void tuple2(char start, char end)
- {
- char count = start;
- char count2 = start;
- for (count2 = start; count2 <= end; count2 ++)
- {
- // cout << count << count2 << endl;
- }
- }
- void tuple1(char start, char end)
- //first digit tuple
- {
- char count = start;
- for (count = start; count <= end; count ++)
- {
- char count2 = start;
- for (count2 = start; count2 <= end; count2 ++)
- {
- char count3 = start;
- for (count3 - start; count3 <= end; count3++)
- {
- cout << count << count2 << count3 << endl;
- }
- }
- tuple2 (count, end);
- }
- }
- //two nested loops for question 4
- int main ()
- {
- char start, end, size;
- cout << "Start?" << endl;
- cin >> start;
- cout << start << " confirmed" << endl;
- cout << "End?" << endl;
- cin >> end;
- cout << end << " confirmed" << endl;
- cout << "Tuple size?" << endl;
- cin >> size;
- cout << "Tuple size " << size << " confirmed" << endl;
- tuple1(start, end);
- return 0;
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement