adspace


int i=1,j=0,n=0;
while(i<4)
{
for(j=1;j<=i;j++)
{
n+=1;
}
i=i+1;
}
System.out.println(n);
}

Answer Posted / Neelima Sagar

This program calculates the sum of numbers from 1 to 4 and prints it out. The output will be 10.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

what kind of questions would be ask me releted from macro and VBA

2029


what's the main questions of MIS interview

2508


linux past question paper ty computer science

3094


Hi I want to persue selenium. can any body please tell me which one is the best institute for selenium in madhapur, hyderabad and also please mention the faculty name.

2329