Powered By Blogger Submit Your Site To The Web's Top 50 Search Engines for Free! Online Marketing

Subscribe Now

Sunday, September 11

Contoh Program Faktorial Basic

Sekarang saya akan membagikan program sederhana pada Qbasic untuk menyelesaikan pemfaktoran (Faktorial).

CLS
10 INPUT "NILAI: ", N
F = N
20 IF N = 1 THEN
PRINT F
GOTO 30
ELSE N = N - 1
F = F * N
GOTO 20
30 END IF
INPUT "LAGI? (Y/T)", K$
IF K$ = "Y" THEN
GOTO 10
ELSE GOTO 40
END IF
40 END

Related Posts


0 Comments:

Post a Comment

Popular Posts This Months

Related Posts Plugin for WordPress, Blogger...