write a program in qbasic to accept a number from the user and check whether it is a 4 digit number or not
Answers
Answered by
5
Answer:
Answer: CLS. INPUT "ENTER ANY NUMBER"; N. C = 0. FOR I = 1 TO N. IF N MOD I = 0 THEN C = C + 1. NEXT I. IF C = 2 THEN. PRINT N;."IS PRIME NUMBER" ELSE
PRINT N;"IS COMPOSITE NUMBER" END IF.
MARK AS BRAINLIST AND THANKS
Similar questions
English,
1 month ago
Physics,
1 month ago
English,
2 months ago
Science,
9 months ago
Business Studies,
9 months ago