write an algorithm to print first N even numbers
Not possible, because there is no such thing as 'biggest even number'
jgfujtf
view
pls ans this
write an algorithm to print first N even numbers
Not possible, because there is no such thing as 'biggest even number'
jgfujtf
view
10
pls ans this
main() { int num=100; printf("The even numbers within 100 are"); while(num!=1) { num=num/2; printf("%d\t",num); } }
Two solutions immediately spring to mind:Run over all the numbers in the range and if the number is even print it;run over the numbers starting with the first even number in the range using a step of 2 (so that only even numbers are considered) and print the numbers.
You can use int i; for (i = 10; i <= 50; i += 2) {//print i} as a program to print even numbers between 10 and 50.
print 3715891200what is this
It is 110.
CLS PRINT "PROGRAM: Print squares of all even numbers from 1 to 20" PRINT PRINT "number", "squared" PRINT FOR number% = 1 TO 20 IF number% MOD 2 = 0 THEN PRINT number%, number% * number% END IF NEXT END