Computer Science, asked by rishavsinghal7110, 5 days ago

WRITE A PROGRAM IN QBASIC TO PRINT THE SUM OF THE NUMBER FROM 100 TO 1 USING LOOP

Answers

Answered by sreyansranjan30
0

Explanation:

public class Sum_of_numbers

{

public static void main()

{

int i = 100;

int sum = 0;

while ( i<=1)

{

sum += i ;

i++ ;

}

System.out.println(" The sum of number from

100 to 1 is " + sum ) ;

}

}

Similar questions