אני מנסה להריץ את התוכנה הזו
והיא לא עובדת!!!
היא אמורה למצוא ככה:
אם המספר הוא ראשוני
אם כל הספרות שלו אחת אחת היא ראשונית
המספר הוא דו ספרתי...
אם ההפרש הוא ראשוניהנה היא:
program rishon; var v,x,y,j,a,b,rishoni,a_rishoni,b_rishoni,i,hefresh,hefresh_r:integer; begin a:=0; b:=0; hefresh_r:=0; rishoni:=0; a_rishoni:=0; b_rishoni:=0; hefresh:=0; for i:=10 to 99 do begin for j:=2 to i div 2 do if i mod j=0 then rishoni:=1; a:=i mod 10; b:=i div 10; for x:=2 to a div 2 do if a mod x=0 then a_rishoni:=1; for y:=2 to b div 2 do if a mod y=0 then b_rishoni:=1; if a>b then hefresh:=a-b; if b>a then hefresh:=b-a; for v:=2 to hefresh div 2 do if hefresh mod v=0 then hefresh_r:=1; if (rishoni=0) and (a_rishoni=0) and (b_rishoni=0) and (hefresh_r=0) then writeln(i); end; end.
|
זה לא כותב כלום...