Computer Science, asked by ashika4, 1 year ago

write a program to display the sum of any "n" natural numbers (using for loop)

Answers

Answered by aamirzaidi2000pe6omb
3
For 10 Natural Numbers :-
In Java
for(int n = 0 ; n < 10 ; n++){

n = n + n;
System.Out.Println(n);


}

Note :- Not Sure Please Check And Let Me Know Also Actually I Didnt Test And I Work In Almost 12 Programming Languages So It Gets Confusing Sometime
Similar questions