Computer Science, asked by subhamgoswami28, 2 days ago

Write a program in QBasic to input a number and check it is
a) divisible by 9 only

b) divisible by 7 only

c) divisible by both 9 and 7​

Answers

Answered by hemantkumark1973
2

Answer:

option c . divisible by both 9 and 7

Answered by vinod04jangid
0

Answer:

nl=[]

for x in range(0, n+1):

  if (x%9==0) and (x%5==0):

      nl.append(str(x))

print (','.join(nl))

Explanation:

QBasic is an incorporated improvement environment (IDE) and interpreter for a number of dialects of BASIC that are primarily based totally on QuickBASIC. Code entered into the IDE is compiled to an intermediate representation (IR), and this IR is right now interpreted on call for inside the IDE.[1]

Like QuickBASIC, however in contrast to in advance variations of Microsoft BASIC, QBasic is a dependent programming language, helping constructs inclusive of subroutines.[2] Line numbers, a idea regularly related to BASIC, are supported for compatibility, however aren't taken into consideration appropriate form, having been changed with the aid of using descriptive line labels.[1] QBasic has confined help for user-described facts sorts (structures), and numerous primitive sorts used to include strings of textual content or numeric facts.[3][4] It helps diverse built in functions.

For its time, QBasic furnished a modern day IDE, such as a debugger with functions inclusive of on-the-fly expression assessment and code modification

#spj3

Similar questions