write a program in qbasic to print first 50 even numbers using counter loop
Answers
Answered by
0
Step-by-step explanation:
FOR i = 1 TO 10
PRINT i * 2
NEXT i
Answered by
0
Answer:
Step-by-step explanation:
We called a number as an even number when it is divisible by 2. So when you want to print the even numbers from 1 to 100 you have to check every number between the range that it is divisible by 2 or not.
In C language, there are three part in a for loop.
First part is initialization. You have to say where the loop starts from. In this case it is 1.
Second part is condition. You need to check either it is not cross the limit. In this case it is 100.
Third part is increment or decrement. That means it is either increases or decreases the initial value. In this case you have to increase the value from 1 to 100.
Similar questions
English,
1 month ago
Hindi,
1 month ago
Biology,
1 month ago
Math,
2 months ago
Computer Science,
2 months ago
Math,
9 months ago
Political Science,
9 months ago