Hello there!
I have two homework assignments that require me to use for loops for algorithms, I'm assuming.
For the first assignment, I have to make an hourglass using asterisks. There are two things the user has to input, how many "#'s" are on the top line and how big the hourglass is. For example:
Enter size of the top row: 5
Enter number of rows: 3
#####
###
#####
That's the solution, but I don't know how to do it using for loops... here's my code at this point:
http://cpp.sh/8wxc3
The for loops at the end are not from me, really.
How would I go about doing it? I don't understand where I should I go.... That's this assignment.
The second one is similar in code, I'm guessing. But I have to have it print like:
enter min range= 3
enter max range= 5
Factors of all numbers in the range: [ 3,5 ]
5: 1, 5
4: 1, 2, 4
3: 1, 3
Here's my code for this one at the moment:
http://cpp.sh/8xgv
Any and all help that would point me in the right direction would be much appreciated! <3