Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

Hi.can any body give me the code for this quesiton
please.Because i dont have to try to enter the code in to
the AS/400 server.Please can anybody give the answer for
this question with complete code?
A smple RPLE pgm which accepts the starting number and
ending number as parameter.It then has to count all the odd
numbers b/w the accepted range of numbers and display the
results/

Ex:if the input parameters are 11 and 30 the result should
be 10(11,13,15,17,19,21,23,25,27,29)

Please explain and give me the complete code?

Answer Posted / arun kumar

D Start S 3S 0
D End S 3S 0
D Count S 3 0
D Temp S 3 0
D Rslt S 3 0
D Rslt1 S 3 0
C *Entry PLIST
C PARM Start
C PARM End
/Free
Eval Temp = Start;
Eval Count = Start;
DoW Count <= End;
If %Rem(Temp:2) <> 0;
Rslt1 = Rslt1 + 1; //Number of ODD Numbers
Rslt = Rslt + Temp; //Sum of ODD Numbers
EndIf;
Temp = Temp + 1;
Count += 1;

EndDo;
Dsply Rslt1;
Dsply Rslt;
*InLR = *ON;
/End-Free
C** *InzSR BegSR
C** EndSR

Is This Answer Correct ?    0 Yes 1 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what is the purpose of putovr (put with explicit override) keyword?

1556


In AS/400 projects in Companies whats the meaning of production support team.what production support involves.also what work does development,maintenance involve what are the other teams or processes that are available for as400 project.

9004


how to toggle between single line and multi - line display of a particular record in a subfile?

1693


how will you search an array?

1032


what is a non-join logical file?

1706


what are the different methods to access seu?

1027


define a output queue?

1495


when do you explicitly open files and close files in an rpg program?

1986


how to get the cursor position?

1077


using dfu, user will be able to ___________ from physical file?

937


how many files can be defined in f specs?

2249


any one have give AS400 study material? pls pass it to gopalsai789@gmail.com

1627


What is dynslt?

1156


To Add A File To The 'file Selection' Option Of A Query, The Function Key To Be Pressed Is?

1161


what is externally described file ?

1589