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
CBSE BOARD X,
1 month ago
Business Studies,
1 month ago
Physics,
3 months ago
English,
3 months ago
Computer Science,
8 months ago
Hindi,
8 months ago