Message Boards Message Boards


How to print only the last result!

Posted 5 months ago
1 Reply
0 Total Likes

Hello! I use

Do[Print[Subscript[a, i] = a[i - 1];  Subscript[c, i] = g[i - 1]], {i,11}]

and need to get only last output. I've haven't found this information at reference, so my question is how to get only i=11 output? Thanks in advance!

Why are you using Print on both Subscript[a, i] and Subscript[c, i] = g[i - 1] when, in fact, you only want to print one of the values of Subscript[c, i] = g[i - 1]?

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract