Write a program in java to find out the sum of n number without using loop or any break statement.
Answers
Answered by
1
Answer:
class Sum
{
int a,b,sum,k;
public static void main(int n)
{
sum=sum+a+b;
k++;
if(k<n)
{
main();
}
}
}
/*Explanation:
PlEASE MARK ME AS BRAINLIEST!!!!*/
Similar questions
Math,
6 months ago
Math,
1 year ago
History,
1 year ago
Social Sciences,
1 year ago
Math,
1 year ago