Computer Science, asked by smosan75, 7 months ago

write a program in qbasic to display the sum of first 10 natural numbers using while wend loop​

Answers

Answered by samarthkrv
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