how to solve this problems can anybody help me i need it before tomorrow
plz!!!!!!!!!(in bluej java)
Attachments:
Answers
Answered by
0
A1
class Numbers
{
public static void main(String args[])
{
int n ;
for (int i = 1 ; i <= 100 ; i++)
{
System.out.println(n) ;
}
}
}
A2
class Series_6
{
public static void main (String args[])
{
int s = 0 , i ;
for(i = 1 ; i <= 19 ; i++)
{
s = s + (i * (i + 1)) ;
}
System.out.println("The sum of the given series = " + s) ;
}
}
A3
import java.io.* ;
class Series_1
{
public static void main (String args[])throws IOException
{
int s = 0 ,n, i ;
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
System.out.println("Enter the value of n") ;
n = Integer.parseInt(br.readLine());
for(i = 1 ; i <= n ; i++)
{
s = s + (i / (i + 1)) ;
}
System.out.println("The sum of the given series = " + s) ;
}
}
A5
import java . io . * ;
class Series_5
{
public static void main ()throws IOException
{
double s = 0 , n , i , a ;
BufferedReader br = new BufferedReader ( new InputStreamReader (System.in) ) ;
System.out.println("Enter the number of terms : ") ;
n = Double.parseDouble(br.readLine()) ;
System.out.println("Enter the value of 'a' : ") ;
a = Double.parseDouble(br.readLine()) ;
for ( i = 0 ; i <= n ; i++ )
{
s = s+( Math.pow(a,i)/i) ;
}
System.out.println("The sum of the given series = " + s) ;
}}
class Numbers
{
public static void main(String args[])
{
int n ;
for (int i = 1 ; i <= 100 ; i++)
{
System.out.println(n) ;
}
}
}
A2
class Series_6
{
public static void main (String args[])
{
int s = 0 , i ;
for(i = 1 ; i <= 19 ; i++)
{
s = s + (i * (i + 1)) ;
}
System.out.println("The sum of the given series = " + s) ;
}
}
A3
import java.io.* ;
class Series_1
{
public static void main (String args[])throws IOException
{
int s = 0 ,n, i ;
BufferedReader br = new BufferedReader(new InputStreamReader(System.in));
System.out.println("Enter the value of n") ;
n = Integer.parseInt(br.readLine());
for(i = 1 ; i <= n ; i++)
{
s = s + (i / (i + 1)) ;
}
System.out.println("The sum of the given series = " + s) ;
}
}
A5
import java . io . * ;
class Series_5
{
public static void main ()throws IOException
{
double s = 0 , n , i , a ;
BufferedReader br = new BufferedReader ( new InputStreamReader (System.in) ) ;
System.out.println("Enter the number of terms : ") ;
n = Double.parseDouble(br.readLine()) ;
System.out.println("Enter the value of 'a' : ") ;
a = Double.parseDouble(br.readLine()) ;
for ( i = 0 ; i <= n ; i++ )
{
s = s+( Math.pow(a,i)/i) ;
}
System.out.println("The sum of the given series = " + s) ;
}}
Similar questions
English,
8 months ago
Math,
8 months ago
Science,
8 months ago
English,
1 year ago
World Languages,
1 year ago