write a program in java to find the sum of the first ten natural number
Answers
Answered by
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