Message Boards Message Boards

0
|
3245 Views
|
1 Reply
|
0 Total Likes
View groups...
Share
Share this post:

How to print only the last result!

Posted 5 years ago

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!

POSTED BY: Alex Graham

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]?

POSTED BY: Murray Eisenberg
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