Q) 3+333+3333......10 terms
Program in java using scanner class
Answers
Answered by
0
import java.util.*;
class series
{
static void display()
{
long a=0;
Scanner sc=new Scanner(System.in);
System.out.println("Enter the number of terms you want");
int n=sc.nextInt();
for(int i=1;i<=n;i++)
{
a=(a*10)+3;
System.out.print(a);
if(i<n)
System.out.print("+");
}
Similar questions
Math,
4 months ago
English,
4 months ago
Science,
4 months ago
Chemistry,
8 months ago
Math,
8 months ago
Social Sciences,
11 months ago
Social Sciences,
11 months ago