Hi
How to do some calculation in a loop ?
loop is given below.. its urgent..
for ( i = 0, n = 0; i < 9; i++ )
{ n += (10 - i) * x.charAt(i) };
Quick help will be appreciated a lot
Please anyone can help me on this issue.
Thanks
Pavan Kumar
How to do some calculation in a loop ?
Moderators: chulett, rschirm, roy
-
- Participant
- Posts: 86
- Joined: Wed Mar 03, 2010 3:09 am
-
- Participant
- Posts: 86
- Joined: Wed Mar 03, 2010 3:09 am
i want to implement that for loop in the datastage,so can anyone please suggest me how to implement that for loop in Datastage Transformer.chulett wrote:A) It's not urgent for us but I just happen to be up and posting at this time.
B) Why not spell out your requirements in words rather than code? Tell us what you have to do, not how you think you need to do it.
for ( i = 0, n = 0; i < 9; i++ )
{ n += (10 - i) * x.charAt(i) };
Here i want to calculate the sum of n once that loop is over.
Thanks
Pavan Kumar
-
- Participant
- Posts: 3337
- Joined: Mon Jan 17, 2005 4:49 am
- Location: United Kingdom
-
- Participant
- Posts: 86
- Joined: Wed Mar 03, 2010 3:09 am