Berikut Source codenya:
uses crt; label balik; var j,n,k,i,r:integer; tanya:char; begin balik: clrscr; i:=0; repeat write('masukkan suku ke n:');readln(n); inc(i); until (i=3) or (n>0) ; if n <=0 then exit; write('sin x= '); write('x'); if n > 1 then begin k:=1; for i:= 2 to n do begin k:=k+2; r:=i mod 2; if r = 0 then write('-') else write('+'); write('x^',k,'/',k,'!'); end; end; writeln; write('apakah mau tampilkan lagi[y/t]:');readln(tanya); if (tanya='y') and (tanya='y') then goto balik; end. |
0 komentar: Program Pascal Membuat Polinomial
Post a Comment