Computer Science, asked by ashasomani75, 3 days ago

write a program in QBASIC using loop to Calculate and display the sum of all numbers from 20 to 2.​

Answers

Answered by samarthkrv
0

Answer:

public class Main

{

public static void main(String[] args) {

 int sum = 0;

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

     sum = sum + i;

 }

 System.out.println(sum);

}

}

Explanation:

Similar questions