5 CLS
10 REM PROGRAM TO ADD FIRST 7 EVEN NUMBERS
20 EV = 2
30 SUM = 0
35 PRINT "NUMBERS=";
40 FOR I = 1 TO 7
50 SUM = SUM + EV
55 PRINT EV;
60 EV = EV + 2
70 NEXT I
95 PRINT
80 PRINT "SUM="; SUM
90 END
http://arnavguddu.6te.net/
find even number in array
In GW-BASIC, you can print even numbers from 1 to 100 using a simple loop. Here’s a sample code: FOR i = 1 TO 100 IF i MOD 2 = 0 THEN PRINT i NEXT i This program iterates through numbers 1 to 100 and prints each number if it is even (i.e., divisible by 2).
I don't now visual basic, but to determine whether or not a number is even or odd, divide it by two twice, and round once. If the rounded result is equal to the non-rounded result, then the original number is even: input n if (n/2.0) == int(n/2.0) print "the number is even"
85
For N = 1 to 10 Print 2 * N Next N
Depends on what you mean. The first even number can be 0.2 or lesser. If you do not include decimal points, then I think zero is the first even number.
So you have a number - "Number" and you need to find if the remainder of dividing it by a number is 0. Number = 3 If Number Mod 2 = 0 then Msgbox("Remainder of 0") End If This function divides by 2 then gives the remainder, this let's you check if a number is odd or even.
"Quicken Deluxe has a number of advanced features that can be very complicated to use, however, the basic functionality of the software is quite intuitive and the program can be used basically quite simply by even novice users."
No, thanks.
In BASIC: 10 INPUT X: IF X = 999 THEN STOP ELSE PRINT X; 20 IF X/2 = INT(X/2) THEN PRINT "EVEN" ELSE PRINT "ODD" 30 GOTO 10
do it yourself... even though i'm looking for the same answer. (: YOLO.
There is no first since the set of even whole numbers stretch to infinity in both directions. The first non-negative even whole number is 0.