Computer Science, asked by aditya58650, 5 months ago

write a program in java to find the sum of the first ten natural number ​

Answers

Answered by Tan90ismyname
1

Explanation:

(I am using default package)

class Natural {

void main ( ) {

double S = 0.0 ;

int i ;

for (i = 1 ; i <= 10 ; i++)

S = S + i ;

System.out.print ("S");

}}

Similar questions