or

24 Computer -- Programming Concepts and Logics

WAP to print the following series:2, 4, 6, 8 up to 10th term.

WAP to print the following series:

2, 4, 6, 8 up to 10th term.

The following is a program to print the following series:

2, 4, 6, 8 up to 10th term.

In  JAVASCRIPT

let a = []

const b = 10


    for (let i=2; i <= b; i+=2) {

       a.push(i)

     }

console.log(a)

  




#include<stdio.h>

#include<conio.h>

#include<string.h>


int main() {

    

    int i, number, num1, num2=0;

    char str1[50];

    num1 = number;

    

   for(i=2; i<=20; i+=2) {

       printf("%d", i);

       printf(", ");

   }


    return 0;

}


More questions on Programming Concepts and Logics

Close Open App