write a program in QBASIC to take input a number and print all the odd factors of that number .
Answers
Answered by
2
Question:-
- Write a program in QBASIC to take input a number and print all the odd factors of that number.
Program:-
CLS
INPUT "ENTER A NUMBER: ",A
PRINT "THE ODD FACTOR(S) IS/ARE "
FOR I = 1 TO A STEP 1
IF A MOD I=0 THEN
IF I MOD 2=1 THEN
PRINT I+" "
END IF
END IF
NEXT I
END
Similar questions