Message Boards Message Boards

GROUPS:

How to print only the last result!

Posted 1 month ago
160 Views
|
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
Attachments
Remove
or Discard

Group Abstract Group Abstract