WAP to print n number of even numbers?
Answers
Answered by
1
Answer:
hello,
its using python
Explanation:
# program to print n number of even numbers
n=int(input("enter the range"))
for i in range (2,n+1,2):
print(i)
OR
n=int(input("enter the range"))
for i in range(1,n+1):
if i%2==0:
print(i)
_____________________
hope it helps you
please mark brainliest
@ItzSnowySecret07
Answered by
0
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 will do it in Java. Hope this will help you.
Similar questions