{Print out a table of powers. Use a for loop that goes from 101 to 112 inclusive. Print out r, r squared, r cubed, square root of r, and cube root of r. Use two decimal places for the roots, and zero decimal places for the squares and cubes, and 2 decimal places for the averages. Use commas in numbers 1000 and above. After the loop, print out the average of the r squared and r cubed. Use columns for your data. Print column headings above your loop.
Also print the data to a file. Attach the file to your submission. Use a txt extension for your file so I can open it in notepad.
So, you will have output to the screen as usual, and also to the file. You can attach as many files as you need to an assignment, just don't click Submit until you have all the files attached.}
// I have figured a lot of it out. This seems all fairly simple, but I'm having a hard time with getting all this information to stick in my brain, and I don't have enough practice yet.
I'm struggling to figure out the best way to do the averages of the squared and cubed numbers, as well as putting the commas in... It seems like it should be so simple, but the solution I attempted led in a failed build without giving me exact error. The current cod I have works great and includes the majority of the data. Just need the averages and commas.
then I have to figure out how to print to a file.
My Code:
//he requests that we keep all these includes, I know they're not all required.