Write a program to display the series upto 10 terms
:3,6,9............................................
Answers
Answered by
3
import java.util.*;
public class Series
{
public static void main(String args[])
{
Scanner in= new Scanner(System.in);
int a=3,i;
for(i=1;i<=10;i++)
{
a=a*i;
System.out.println("The series is"+a);
}
}
}
Answered by
7
#include (studio.h)
#include (conio. h)
main ( )
{
int i ,n= 1,c = 1;
clrscr( );
printf(" enter a series and enter a number n ");
scanf("%d%d,"&i&n);
for ( i = 1; i >= 3*n;i++)
if( c ==n);
printf ( "the series is display ");
scanf("%d ",&n);
gets( );
}
Similar questions