All the smallest factors of a number must be its smallest factor, which for any number is 1, so:
loop
loop
loop
print "Enter an integer number: ":
input n
until num(n) do
print "Please enter a number"
repeat
until n = int(n) do
print "Please enter an integer"
repeat
print "Smallest factor of ":n:" is 1"
repeat
Chat with our AI personalities
HERE IS IT!!!!!#include#includevoid main(){int a[12],b[12],c[12],i,j=0,k=0;clrscr();printf("Enter an integer\n");for(i=0;i
10 cls 20 input"enter word";word$ 30 print word$ 40 print len(word$) 50 end this program is for GW BASIC for other BASIC's the line numbers are optional.
QBASIC code/Editor Screen (Press key [F5] to make the program RUN/execute...) ==== (Pressing any key returns you straight back to the Editor screen; where you can either chose to further Edit/Re-Run/or else, Save your program.) Here is another example. CLS COLOR 15, 4, 14 PRINT "Press any key to continue" DO WHILE INKEY$ = "" LOOP FOR c = 1 TO 20 COLOR c, 0 PRINT "Replace this with the name you want to display" NEXT c COLOR 15, 0 END
Program is the US spelling.Programme is the UK spelling.
Debugging makes the program works fast while maintainance makes the program slow