Computer Science, asked by 09niharikakharwar, 2 months ago

WAP to print n number of even numbers?​

Answers

Answered by pakhi4400
0

u mean wrap?

Explanation:

in excel i didn't get ya question my friend


09niharikakharwar: prarthna
Answered by atrs7391
1

in QBasic

CLS

INPUT "Enter the number", N

PRINT "Even numbers are:  "

FOR I = 1 TO N

THEN

IF (I MOD 1 = 0)

PRINT I

END IF

NEXT I

END

If QBasic is not the one your looking for then comment. I can do it in Java or Python. Hope this will help you.


anindyaadhikari13: There is a mistake in your answer, it will be - IF I MOD 2 = 0 THEN..
anindyaadhikari13: Correct it.
atrs7391: Thanks
Similar questions