Exit code 201

I have a task to write a program in Pascal. When I run the program, the result was exitcode 201.

Bạn đang xem: Exit code 201

quý khách hàng đã xem: Lỗi exit code 20một trong các không tính tiền pascal

I don"t know how khổng lồ fix this error.

program convertTime; uses crt; Type Jam = record hh:integer ; mm:integer ; ss:integer; end; var J : Jam; P.,totaldetik,sisa : integer; begin J.hh:= 16; J.mm:= 10; J.ss:= 34; write("masukkan waktu(menit): ");read(p); totaldetik:= (J.hh*3600) + (J.mm*60) + J.ss + (p*60); J.hh:= totaldetik div 3600; sisa:= totaldetik hack 3600 ; J.mm:= sisa div 60; J.ss:= sisa hack 60; writeln("total the time: ",J.hh," Hour ",J.milimet," Minute ",J.ss," second"); readln; over.



As seen in other questions, the error code 201 is a range check error. Put simply, a value"s trying to lớn be stored where it doesn"t fit.

Xem thêm: Hướng Dẫn Cách Cài Font Chữ Cho Photoshop Cực Đơn Giản, Cách Để Thêm Phông Chữ Vào Photoshop

Your totaldetik variable looks like it would often be higher than the limit for an integer value, so you"ll need a larger variable to lớn store it in. Try making totaldetik a longint instead.



Thanks for contributing an answer to lớn Staông chồng Overflow!

Please be sure lớn answer the question. Provide details và chia sẻ your research!

But avoid

Asking for help, clarification, or responding to other answers.Making statements based on opinion; bachồng them up with references or personal experience.

To learn more, see our tips on writing great answers.

Post Your Answer Discard

By clicking “Post Your Answer”, you agree lớn our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged pascal freepascal turbo-pascal or ask your own question.


Your privacy

By clicking “Accept all cookies”, you agree Staông xã Exchange can store cookies on your device and discthua information in accordance with our Cookie Policy.