Problem description
Create a program that outputs the sum of the numbers 1 to 40.
Answers
Answered by
1
Answer:
class abc
{
void display ( )
{
int s=0;
for ( int x=1;x<=40;x++)
{
s=s+x;
}
System.out.println(s);
}
}
Explanation:
MARK ME AS THE BRAINLIEST
Similar questions
English,
2 months ago
Math,
4 months ago
Math,
4 months ago
Science,
9 months ago
Accountancy,
9 months ago
Accountancy,
9 months ago