write a program in qbasic to display the sum of first 10 natural numbers using while wend loop
Answers
Answered by
0
Answer:
class HelloWorld {
public static void main(String[] args) {
int i = 0;
int sum = 0;
while(i <= 10){
sum = sum + i;
i++;
}
System.out.println(sum);
}
}
Explanation:
Similar questions