Write a program to display prime numbers between 1 to 100 using RPGLE.
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 |
Hi, I am getting the error in RPG (All Record Formats for externally-described file ABCD ignored or dropped due to error; file ignored.) Please suggest any
How can read PF in reverse order (end to start) in CL pgm..
what is the use of sflnxtchg?
what is the procedure and explain about real time scenario.
0 Answers Adhoc Technologies, Hanuman Automation, HSBC, IBM,
How to select highest score of each subject or how to select highest income of every month?
steps for debugging two rpg programs????
Can we used ovrdbf command after the opnqry file if yes then What will be out put of your program?
what r drawbacks of OPM? Why do we go for ILE RPG?
Can anybody tell me the setps to create .csv file in IFS folder on AS/400. I also need to know how I can send this .csv file to PC in xls sheet.....?
in rpg could u please tell me errors types and meanings like 3030 that ....
How can we override a file during runtime in rpg?
what built in function can be used with SETLL.If you want to check whether the search argument is successful or not? Please give me answer with example?