Computer Science, asked by aditichauhan69, 1 year ago

write a program to print the sum of the first 10 multiples of 5

Answers

Answered by nain31
1
import Java. so.*
Class g;
(
psvm
(
int. i,z=0, s=0,ctr=0;
while(ctr!=10)
(
for(i=1;i<=z;i++)
(
if(i<5)
(
if(5%i==0)
s=s+i;
ctr±±;
)
if(i>5)
(
if(i%5==0)
s=s±I;
ctr++;
)
z+±;
)
Sopln("the sum of first 10 multiples of 5 is"+ s);
)
)


hope it helps...
if u don't get anything just ask Me..
Similar questions