Computer Science, asked by pmishrajasmine, 5 months ago

Write a QBASIC program to display time in hours and convert times into minutes as well as seconds using Input statement.​

Answers

Answered by pranav1849
1

Answer:

ANS OF

There are 28 boys and 22 girls in your class. WAP to find the

percentage of boys and girls in the class.

Program

Cls

Let B = 28

Let G = 22

Let T = B + G

Let PERB = B / T * 100

Let PERG = G / T * 100

Print "PERCENTAGE OF BOYS= "; PERB

Print "PERCENTAGE OF GIRLS= "; PERG

End

Answered by amikkr
4

The Qbasic program displays time in hours and converts times into minutes and seconds using the input statement is as follows-

  • A programming language is QBASIC.  One may tell the computer what to do using this programming language. QBasic is a QuickBASIC-based integrated programming environment and interpreter for a number of BASIC dialects. Qbasic code always starts with "CLS".
  • The code-

CLS

INPUT "ENTER TIME IN HOUR: "; N

M=N*60;

S=N*3600;

PRINT "As given the time in Hours:"; N

PRINT "The same time in  MINUTES:"; M

PRINT "The same time in SECONDS:";S

END.

#SPJ3

Similar questions
Physics, 11 months ago