saravanan manikrishnan


{ City } bangalore
< Country > india
* Profession * project engineer
User No # 123096
Total Questions Posted # 4
Total Answers Posted # 1

Total Answers Posted for My Questions # 1
Total Views for My Questions # 7394

Users Marked my Answers as Correct # 3
Users Marked my Answers as Wrong # 2
Questions / { saravanan manikrishnan }
Questions Answers Category Views Company eMail

Write a program to display prime numbers between 1 to 100 using RPGLE.

1 RPG400 4681

Why we are not able to perform insert delete and update operation in Join logical file?

IBM,

IBM AS400 AllOther 1044

What is the difference between copybooks and subprocedures in as400?

RPG400 940

Why we have multiple data types in As400 and why we use numeric, packed, decimal, zoned the basic difference between this?

IBM AS400 AllOther 729




Answers / { saravanan manikrishnan }

Question { 4681 }

Write a program to display prime numbers between 1 to 100 using RPGLE.


Answer

D N S 2P 0 INZ 0
D Q S 2P 0
D R S 2P 0
D I S 2P 0

C PARM N
MOVE 2 I
DOU I >= N
I DIV N Q
MVR R
IF R=0
“Number is not PRIME” DSPLY
ENDIF
ADD 1 I
ENDDO
IF N=I
THEN
“Number is PRIME” DSPLY
ENDIF
C SETON LR

Is This Answer Correct ?    3 Yes 2 No