write a program in QBASIC using loop to Calculate and display the sum of all numbers from 20 to 2.
Answers
Answered by
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
Science,
1 day ago
Math,
1 day ago
Science,
1 day ago
Computer Science,
8 months ago
Social Sciences,
8 months ago