Parkside's Other Triangle
Here's what the book says:
Parkside's Other Triangle is generated from two positive integers, one for the size and one for the seed. For example,
Size 6, Seed 1
1 2 4 7 2 7
3 5 8 3 8
6 9 4 9
1 5 1
6 2
3
Size gives the number of columns. Seed specifies the starting value for column 1. Column n contains n values. The successive values are obtained by adding 1 to the previous value. When 9 is reached, the next value becomes 1.
Write a program that reads pairs of positive integers and produces Parkside's Other Triangle for each pair.
This is what I have so far:
Code:
#include <iostream>
#include <stdlib.h>
using namespace std;
int main ()
{
int size, seed, LCV;
cout << "Enter the size: ";
cin >> size;
cout << "Enter the seed: ";
cin >> seed;
return 0;
}
All it does is ask for the size and the seed and you can input the values you want.
Im supposed to use nested "for" loops to produce the triangle thing in the example i gave above.
Like:
for(---;---;---)
for(---;---;---)
command;
I cant use super advanced stuff, all we've learned so far is loops and conditional statements, variables, and basic commands.
If you can help, Thanks!