Identification Division.
Program-ID.
Environment Division.
Data Division.
Working-Storage Section.
77 Sum PIC 9(4) Value 0.
77 N PIC 9(6).
77 Temp PIC 9(6).
77 Rem PIC 9.
Procedure division.
Main-Para.
Display "Enter Number (Maximum 6 digits) :".
Accept N.
Move N To Temp.
Perform Para-1 Until N = 0.
Display "Sum of the digit of " Temp " digit number " Sum.
Stop Run.
Para-1.
Divide N BY 10 Giving N Remainder Rem.
Compute Sum = Sum + Rem.
How to rectify the following error
ReplyDeleteNo Input files
How to rectify the following error
ReplyDeleteNo Input files
IS the Program Is Compiling Or getting any errors
Delete