Write a program to calculate the following
i want a Java program for this condition
1+4+9+16+….+100
Like this (1^2+2^2)
Hint use function pow(a,b)
Answer Posted / sumitpalsingh
public class Power {
public static void main(String[] args) {
int b=2;
for(int i=1;i<=10;i++)
{
System.out.println(Math.pow(i,b));
}
}
}
| Is This Answer Correct ? | 7 Yes | 1 No |
Post New Answer View All Answers
how many types of operating system are avaliable?
In project we have Documentation phase also,in that what is micro and macro designing?
In OB52 , How to define two open posting period, Like only 5 and 8 posting should be open.. should not open 6 and 7..period..
When will you use shell script/Perl ahead of C/C++?
how CLR identify vb file?
hi viewers, tell me,what is scripting and programming, define and difference...pls
how can we maintain the previous version scripts to new version.
what are the 3 forms of a prolog term
What is the use of Differ interface check box in Ship confirm?
8.In DSP,Define Signal and System?and various type of signals.
how to data grid use in data bind?
what is difference between kpo and it industry? that is in terms of work, package etc
1. How many jobs can we write in a single file? 2. How many maximum members can exist in a single partition data set(pds) in jcl?
I want to pass .pdf files as OlE Object to crystal report through VB6. Please any one guid me...
what are all the validation we need to perform in data stage?