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
Social Sciences,
2 months ago
Computer Science,
2 months ago
Physics,
2 months ago
Physics,
5 months ago
Computer Science,
5 months ago
Biology,
10 months ago
Science,
10 months ago