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
purpose of abstraction and interface
How to connect to ms word wit VB ojective is to prepare s/w to generate question paper , selects questions randomly from the ms access , database
Can i please VHDL code for D-Latch with clear input ?? (HINT: Set up a “Process” with appropriate sensitivity list to get the desired D-Latch with Clr working.) Inputs and Outputs: entity Lab4b is Port ( Clr, Clk, D : in STD_LOGIC; Q : out STD_LOGIC); end Lab4b;
MOV.CB 007H,ADCON1 MOVE.CT 001H,_OPTION_REG_7 MOV.CB 007H,CMCON
Write code to read the records from a file and load any array of size 99?make sure that you take care of all the error conditions?
what is the filters in biztakk server? where it can use?
could u please also write an example of a code that involves instances from an abstract class just as u did for interfaces because u said it could also work which i really doubt. thanks
what is difference between input parameter and output parameter.
How does the type system works when there is interoperability between a COM and .Net, i mean what exactly happens there
what is the difference between Windows application and Unix application?
what is the difference between read the data from table and infotype
what is the diffrence between software and hardware language?
Find out the roles which gives access to all tables in SAP? Thanks in advance.
can any one suggestion me present which course(except java,.net) has huge demand in the market?
10.Define filters,binary to hexadecimal,hexadecimal to decimal?