Computer Science, asked by surjyoprprovomotilal, 20 days ago

write a program in qbasic to take input of a number whether it is a prime or composite​

Answers

Answered by revajamwal7
2

Answer:

QBasic Programming

INPUT "ENTER ANY NUMBER"; N. C = 0. FOR I = 1 TO N. IF N MOD I = 0 THEN C = C + 1. NEXT I. SUB PRIME (N C = 0. FOR I = 1 TO N. IF N MOD I = 0 THEN C = C + 1. DECLARE FUNCTION PRIME(N) INPUT "ENTER ANY NUMBER"; N. P = PRIME (N) IF P = 2 THEN. FUNCTION PRIME (N) C = 0. FOR I = 1 TO N. IF N MOD I = 0 THEN C = C + 1.

Explanation:

HOPE IT HELPS YOU!!

please mark me as brilliant..

Similar questions