1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 |
/* Java Pyramid 5 Example This Java Pyramid example shows how to generate pyramid or triangle like given below using for loop. 12345 1234 123 12 1 */ public class JavaPyramid5 { public static void main(String[] args) { for(int i=5; i>0 ;i--){ for(int j=0; j < i; j++){ System.out.print(j+1); } System.out.println(""); } } } /* Output of the example would be 12345 1234 123 12 1 */ |
Hi,
I need a code for
1
12
123
1234
please help me.
import java.util.Scanner;
class prc2
{
public static void main(String arg[])
{
Scanner a=new Scanner(System.in);
int n=a.nextInt();
for(int i=1;i<=n;i++)
{
for(int j=1;j<=i;j++)
{
System.out.print(” ” +j);
}
System.out.print(“\n”);
}
}
Thank You,
Can u please send one more code to me.
…1
12
.123
1234
Hi Guys
Need help thank you.
1 4 9 16 25 36 49 64 81 100
4 9 16 25 36 49 64 81 100
9 16 25 36 49 64 81 100
16 25 36 49 64 81 100
25 36 49 64 84 100
36 49 64 81 100
49 64 81 100
64 81 100
81 100
100
import java.util.*;
class h
{
public static void main(String args[])
{
Scanner sc=new Scanner(System.in);
String s=”1234″;
int n1=s.length();
for(int i=0;i<n1+1;i++)
{
for(int j=0;j<i;j++)
{
String word=s.substring(0,i);
System.out.print(word);
break;
}
System.out.println();
}
}
}
public class MyClass {
public static void main(String args[]) {
int i,j,n=6;
for(i=0;i<n;i++)
{
for(j=1;j<i;j++)
{
System.out.print(""+j);
}
System.out.println("");
}
}
}
public class PyramidExample{
public static void main(String args[]){
for(int i=1;i<=4;i++){
for(int j=1;j<=i;j++){
System.out.print(j);
}System.out.println();
}
}
}
Please help for doing this
54321
321
1
for (int i = 5; i >= 1; i = i – 2) {
for (int j = i; j >= 1; j–) {
System.out.print(j);
}
System.out.println();
}
i need code
1 2 3 4 5
6 7 8
9
10 11 12
13 14 15 16 17
int num = 1;
int row = 0;
int j = 5;
for (; j >= 1; j = j – 2) {
for (int k = 1; k <= j; k++) {
System.out.print(num);
num++;
}
System.out.println();
row++;
}
j = row;
for (; j <= 5; j = j + 2) {
for (int l = 1; l <= j; l++) {
System.out.print(num);
num++;
}
System.out.println();
}
int num=1;
for(i=1;i<=5;i+=2)
{
System.out.println();
for(j=i;j<=5;j++)
{
System.out.print(num);
num++;
}
}
for(i=1;i<=2;i++)
{System.out.println();
for(j=2*i+1;j>=1;j–)
{
System.out.print(num);
num++;
}
}
please i a user to enter an integer from 1-15 to display in a pyramid form how..
{
Scanner input = new Scanner(System.in);
System.out.print(“Enter the number of lines: “);
int numberOfLines = input.nextInt();
if ((numberOfLines < 1) || (numberOfLines > 15))
{
System.out.println(“You must enter a number from 1 to 15”);
System.exit(0);
}
for (int row = 1; row <= numberOfLines; row++)
{
for (int column = 1; column <= numberOfLines – row; column++)
{
System.out.print(” “);
}
for (int num = row; num >= 1; num–)
{
System.out.print(” ” + num);
}
for (int num = 2; num <= row; num++)
{
System.out.print(” ” + num);
}
System.out.println(“”);
}
input.close();
}
1
121
12321
1234321
123454321
please Help ASAP
public class Helper
{
public static void main(String args[]){
String space;
for(int i = 1; i <= 5; i++){
space = “”;
for(int j = 1; j <=i; j++)space+=j;
for(int k = i-1; k>0;k–)space+=k;
System.out.println(space);
}
}
}
package pyromid;
public class prmdmodel6
{
public static void main(String args[]){
for(int i = 1; i <= 5; i++){
for(int j = 1; j <=i; j++)
System.out.print(j);
for(int k = i-1; k>0;k–)
System.out.print(k);
System.out.println();
}
}
}
import java.util.Scanner;
public class JavaPyramid {
public static void main() {
int d;
Scanner sc=new Scanner(System.in);
System.out.println(“number:”);
d=sc.nextInt();
for(int i=d; i>0 ;i–){
for(int j=0; j < i; j++){
System.out.print(j+1);
}
System.out.println("");
}
}
}
What is the code for
1020304050
10203040
102030
1020
10
Please, Help me.
public class xyz
{
public static void main(String args[]){
String space;
for(int i = 0; i <= 4; i++){
space=””;
for(int j = 1;j<=5-i;j++){
space+=j+”0″;
}
System.out.println(space);
}
}
}
/*
1020304050
10203040
102030
1020
10
*/
package pyromid;
public class prmdmodel5 {
public static void main(String[] args) {
for(int i=5;i>0;i–)
{
for(int j=1;j<=i;j++)
{
System.out.print(j*10);
}
System.out.println();
}
}
}
thank you
what is the code for
1
2 6
3 7 10
4 8 11 13
5 9 12 14 15
….1
…2 6
..3 7 10
.4 8 11 13
5 9 12 14 15
could u specify the pattern more clearly?
1
2 6
3 7 10
4 8 11 13
5 9 12 14 15
in 1st row there are 4 space
in 2nd row 3 space
in 3rd row 2 space
4th row 1 space
5th row no space
public class Helper
{
public static void main(String args[]){
String space;
int c = 0;
for(int i = 1; i <= 5; i++){
space=””;
space+=i+” “;
c=i;
for(int j = 1; j < i; j++){
space+=(c+(5-j))+” “;
c=c+(5-j);
}
System.out.println(space);
}
}
}
Thanku….
Your welcome..
space=”” and space+=i+””;
i can’t understand…
let me write it more clearly
space = “”;
space += i + ” “; //not empty. It has space
/* If you look at the Radhesham’s pattern, the first element of the nth line is n. Take a look,
for the 1st line
1
-> 1st element of 1st line is 1
next line
2 6
-> 1st element of 2nd line is 2.
and so on.
In my loop, I use the counter i in the first loop for the number of lines(I hope thats clear).
Hope this helped!
can u tell me code of it??
*
* *
* *
* *
*
Write a program to draw the following patterns:
* * * * * * * * * * * * * * * *
* * * * * * * * * * * * * *
* * * * * * * * * * * *
* * * *
* *
public class Patt {
public static void main(String[] args) {
for (int i = 8; i>=1; i–) {
if(i==1||i==2||i==6||i==7||i==8)
{
for (int j = 1; j <=(i*2); j++) {
System.out.print(“*”);
}
System.out.println(“\n”);
}
}
}
}
Can i know the sample code of this :
Sample Output:
Enter a Name: Atheena
Hello Atheena!!!
The first letter of your name is a vowel.
Ath
Ath Ath
Ath Ath Ath
Ath Ath Ath Ath
Ath Ath Ath Ath Ath
Try Again? [Y/N]: yes
Enter a Name: Raizel
Hello Raizel!!!
The first letter of your name is a consonant.
Rai Rai Rai Rai Rai
Rai Rai Rai Rai
Rai Rai Rai
Rai Rai
Rai
Try Again? [Y/N]: Yes
package sample;
import java.util.Scanner;
public class PattrenPrint {
public static void main(String[] args) {
Scanner in=new Scanner(System.in);
System.out.println(“enter name …”);
String name=in.next();
if(name.charAt(0)==’a’||name.charAt(0)==’e’||name.charAt(0)==’i’||name.charAt(0)==’o’||name.charAt(0)==’u’){
char[] arr=name.toCharArray();
for (int i = 0; i < arr.length; i++) {
for (int j = 0; j < i; j++) {
System.out.print(” “+name.substring(0,3));
}
System.out.println();
}
}
else{
char[] arr=name.toCharArray();
for (int i = arr.length; i >= 0; i–) {
for (int j = 0; j < i; j++) {
System.out.print(” “+name.substring(0,3));
}
System.out.println();
}
}
}
}
package sample;
import java.util.Scanner;
public class PattrenPrint {
public static void main(String[] args) {
Scanner in=new Scanner(System.in);
System.out.println(“enter name …”);
String name=in.next();
System.out.println();
System.out.println(“Hello….! “+name);
if(name.charAt(0)==’a’||name.charAt(0)==’e’||name.charAt(0)==’i’||name.charAt(0)==’o’||name.charAt(0)==’u’||name.charAt(0)==’A’|name.charAt(0)==’E’||name.charAt(0)==’I’||name.charAt(0)==’O’||name.charAt(0)==’U’){
char[] arr=name.toCharArray();
for (int i = 1; i <= 5; i++) {
for (int j = 0; j < i; j++) {
System.out.print(” “+name.substring(0,3));
}
System.out.println();
}
}
else{
char[] arr=name.toCharArray();
for (int i = 5; i >=1; i–) {
for (int j = 0; j < i; j++) {
System.out.print(” “+name.substring(0,3));
}
System.out.println();
}
}
in.close();
}
}
What is the code for :
COMPUTER
COMPUTE
COMPUT
COMPU
COMP
COM
CO
C
public class Test
{
public static void main(String[] args)
{
String s=”string”;
char c[]=s.toCharArray();
for(int i=s.length();i>=1;i–){
for(int c1=0;c1<i;c1++){ system.out.print(c[c1]);}}}};=””>
public class StringPatt {
public static void main(String[] args) {
String patt=”COMPUTER”;
for (int i = patt.length()-1; i >=0; i–) {
for (int j = 0; j <=i; j++) {
char c=patt.charAt(j);
System.out.print(c);
}
System.out.println();
}
}
}
/*
computer
compute
comput
compu
comp
com
co
c
*/
package pyromid;
import java.util.Scanner;
public class prmdmodel3 {
public static void main(String[] args) {
Scanner sc=new Scanner(System.in);
System.out.println(“enter string”);
String st=sc.next();
char ch[]=st.toCharArray();
for(int i=ch.length;i>=0;i–)
{
for(int j=0;j<i;j++) {=”” system.out.print(ch[j]);=”” }=”” system.out.println();=”” }=”” }=”” }=””>
**
***
****
*****
******
can anyone please tell me the code for above pattern
class AA
{
public static void main(String[] args)
{
for(int i=2;i<7;i++){
for(int j=0;j<i;j++){ system.out.print(“*”);=”” }=”” system.out.println(“”);}}}=””>
what is the code for….
999999999
88888888
7777777
666666
55555
4444
333
22
1
1
22
333
4444
55555
666666
7777777
88888888
999999999
class Nested_For
{
public static void main(String args[])
{
for(int i=9;i>=1;i–)
{
for(int j=1;j<=i;j++)
{
System.out.print(i+” “);
}
System.out.println(” “);
}
for(int i=1;i<=9;i++)
{
for(int j=1;j<=i;j++)
{
System.out.print(i+” “);
}
System.out.println(“”);
}
}
}
public class pyromid {
public static void main(String[] args) {
for(int i=9;i>0;i–)
{
for(int j=0;j<i;j++) {=”” system.out.print(i);=”” }=”” system.out.println();=”” }=”” for(int=”” i=”1;i<=9;i++)” {=”” for(int=”” j=”0;j<i;j++)” {=”” system.out.print(i);=”” }=”” system.out.println();=”” }=”” }=”” }=””>
public class MyPatt {
public static void main(String[] args) {
for (int i = 9; i >=1; i–) {
for (int j = 1; j <=i; j++) {
System.out.print(i);
}
System.out.println();
}
for (int i = 1; i <=9; i++) {
for (int j = 1; j <=i; j++) {
System.out.print(i);
}
System.out.println();
}
}
}
class Down
{
public static void main(String args[])
{
for(int i=9;i>=1;i–)
{
System.out.println();
for(int j=1;j<=i;j++)
{
int k=i;
System.out.print(k);
}
}
for(int i=1;i<=9;i++)
{
System.out.println();
for(int j=1;j<=i;j++)
{
int h=i;
System.out.print(h);
}
}
}
}
import java.util.Scanner;
public class Pyramid2 {
public static void main(String args[])
{
Scanner s=new Scanner(System.in);
System.out.println(“Enter number of rows: “);
int rows=s.nextInt();
for(int i=rows;i>=0;i–)
{
for (int j=1;j<=i;j++)
{
System.out.print(j);
}
System.out.print(“\n”);
}
for(int i=1;i<=rows;i++)
{
for(int j=1;j<=i;j++)
{
System.out.print(j);
}
System.out.println();
}
}
}
What will be the code for
0
0 1
0 2 4
0 3 6 9
0 4 8 16 20
0 5 10 15 20 15
package pyromid;
public class pyromidmodel8 {
public static void main(String[] args) {
// TODO Auto-generated method stub.
for(int i=0;i<=5;i++)
{
for(int j=0;j<=i;j++)
{
System.out.print(” “+j*i);
}
System.out.println();
}
}
}
what will be the code for this?
12345 54321
1234 4321
123 321
12 21
1 1
12 21
123 321
1234 4321
12345 54321
package New_JT;
public class Pyramid1
{
public static void main(String[] args)
{
for (int j = 5; j >= 0; j–)
{
System.out.println(” “);
for (int i=1; i<=j; i++)
{
System.out.print(i);
}
System.out.print(” “);
for (int i=j; i>0; i–)
{
System.out.print(i);
}
}
for (int i = 2; i <= 5; i++)
{
for (int k=1; k<=i;k++)
{
System.out.print(k);
}
System.out.print(” “);
for (int m=i;m>0;m–)
{
System.out.print(m);
}
System.out.println();
}
}
}
public class Pyramid {
public static void main(String[] args) {
for (int i = 5; i >=1; i–) {
for (int j = 1; j <=i; j++) {
System.out.print(j);
}
System.out.print(” “);
for (int j1 = i; j1 >=1; j1–) {
System.out.print(j1);
}
System.out.println();
}
for (int i = 2; i <=5; i++) {
for (int j = 1; j <=i; j++) {
System.out.print(j);
}
System.out.print(” “);
for (int j1 = i; j1 >=1; j1–) {
System.out.print(j1);
}
System.out.println(” “);
}
}
}
what will be the code for this?
12345 54321
1234 4321
123 321
12 21
1 1
12 21
123 321
1234 4321
12345 54321
int h=0;
for(int i=5; i>0 ;i–){
for(int j=1; j <= i; j++){
System.out.print(j);
h=j;
}
System.out.print(” “);
for (int j = 1; j<=i; j++) {
System.out.print(h–);
}
System.out.println(“”);
}
for(int i=2; i<= 5 ;i++){
for(int j=1; j <= i; j++){
System.out.print(j);
h=j;
}
System.out.print(” “);
for (int j = 1; j<=i; j++) {
System.out.print(h–);
}
System.out.println(“”);
}
thank u for answer
1
3 24 5
7 9 115 11 13
i need a code
…………1
…..3…..24…….5
7…9…..115…..11……13
what is the code for this
54321
5432
543
54
5
*
* *
* * *
* * * *
* * * * *
please help me
public class MyPatt {
public static void main(String[] args) {
for (int i = 1; i<=5; i++) {
for (int j = 5; j>=i; j–) {
System.out.print(j);
}
System.out.println();
}
for (int i = 1; i <=5; i++) {
for (int j = 1; j <=i; j++) {
System.out.print(“*”);
}
System.out.println();
}
}
}
cn u plz tell me the code for..
1
121
12123
Need code for
*
**
***
****
*****
code–
class print_star
{
public static void main(String args[])
{
int i,j;
for(i=1; i<=4; i++)
{
System.out.println();
{for(j=1; j<=i; j++)
System.out.print(“*”);
}
}
}
}
public class Loop
{
public static void main(String args [])
{
int ctr=0;
int ctr1=0;
int n=0;
Scanner scan=new Scanner (System.in);
System.out.println (“Enter number:”);
n=scan.nextInt();
for (ctr1=1;ctr1<=n;ctr1++)
{
for (ctr=1;ctr<=ctr1;ctr++)
{
System.out.print (“*”);
}
System.out.println ();
}
}
}
Need Input for
*
**
***
****
*****
i want this output!!!!
*
* *
* * *
* * * *
* * * * *
not this one but it is like
1 *
2 * *
3 * * *
public class numberformat1 {
public static void main(String[] args) {
int row, column;
// Total number of rows it will iterate
for (row = 1; row <= 5; row++) {
// total number of columns it will iterate
for (column = 1; column <= row; column++) {
System.out.print(“*” + ” “);
}
System.out.println(“”);
}
} // end method main
} // end class
hjj
/** write a progarm to print following pattern.
*
**
***
****
*****
*/
class PatternDemo2
{
public static void main(String args[])
{
for(int i=1;i<=5;i++)
{
for(int j=1;j<=5;j++)
{
if(j<=i)
{
System.out.printf(“*”);
}
}
System.out.println();
}
}
}
Console.WriteLine(“input a rows”);
int rows=Convert.Toint32(Console.ReadLine());
For(int i=1;i<=rows;i++)
{
for(int j=1;j<=i;j++)
{
Console.WriteLine(“*”);
}
}
output:
The pyramid is –
1
232
45654
7890987
123454321
67890109876
2345678765432
901234565432109
78901234543210987
6789012345432109876
public class numberformat1 {
public static void main(String[] args) {
int row, column;
// Total number of rows it will iterate
for (row = 1; row <= 5; row++) {
// total number of columns it will iterate
for (column = 1; column <= row; column++) {
System.out.print(“*” + ” “);
}
System.out.println(“”);
}
} // end method main
} // end class
5 4 3 2 *
5 4 3 * 1
5 4 * 2 1
5 * 3 2 1
* 4 3 2 1
code for it in java??
public class MypattNum {
public static void main(String[] args) {
for (int i = 1; i <=5; i++) {
for (int j = 5; j >=1; j–) {
if(i==j)
{
System.out.print(“*”);
}
else
{
System.out.print(j);
}
}
System.out.println();
}
}
}
Thanks bro….
its ok brother….
I want this output
*
*
* *
* *
* * *
*1
*2*2
*3*3*3
*4*4*4*4
*5*5*5*5*5
i want this output
public class Jamod
{
public static void main(String args[])throws Exception
{
for(int i=1;i<=5;i++)
{
for(int j=1;j<=i;j++)
{
System.out.print(“*”+i);
}
System.out.println();
}
}
}
Very good
i want mirror of following pattern……
J
JA
JAV
JAVA
You can try this -:
public static void main(String[] args) {
String s1=”JAVA”;
char[] array=s1.toCharArray();
for(int i=0;i<=array.length-1;i++){
for (int j=0;j<=i;j++){
System.out.print(array[j]);
}
System.out.println(“”);
}
}
i want this output
*
* *
* * *
* * * *
class pattern
{
public static void main()
{
int i,j;
for(i=1;i<=4;i++)
{
for(j=1;j<=i;j++)
{
System.out.print(” * “);
}
System.out.println();
}
}
}
/\
/ \
/ \
/_ _ _ _ \
I want the output of:
15 14 13 12 11
10 9 8 7
6 5 4
3 2
1
public static void main(String []args){
int k=6;
for(int j=15;j>0;j–)
{
for (int i=1;i<k;i++) {=”” system.out.print(j–);=”” }=”” j=”j+1;” k=”k-1;” system.out.println();=”” }=”” }=”” }=””>
Thanx
i want this output
______1
____2 1 2
__3 2 1 2 3
_4 3 2 1 2 3 4
…… and so on upto N rows
i want this output
1
2 3
4 5 6
7 8 9 10
7 8 9 10
4 5 6
2 3
1
what is the code for
1
2 1
1 2 3
4 3 2 1
1 2 3 4 5
9 8 7 6
10 11 12
14 13
15
1
3 2
4 5 6
10 9 8 7
13 12 11
15 14
16
what is the code for this??
class Pattern{
public static void main(int n)
{
int i,j,p,k=1;
for(i=1;i<=n;i++){
if(i%2==0){
for(j=1;j<=i;j++){
k++;
}
p=k-1;
for(j=1;j<=i;j++){
System.out.print(p+”\t”);
p–;
}
}
else
{
for(j=1;j<=i;j++){
System.out.print(k+”\t”);
k++;
}
}
System.out.println();
}
for(i=n-1;i>=1;i–){
if(i%2==0){
for(j=1;j<=i;j++){
k++;
}
p=k-1;
for(j=1;j<=i;j++){
System.out.print(p+”\t”);
p–;
}
}
else
{
for(j=1;j<=i;j++){
System.out.print(k+”\t”);
k++;
}
}
System.out.println();
}
}
}
what is the code for this..
1
3 4
6 7 8
10 11 12 13
import java.util.*;
class SamplePattern
{
public static void main(String[] arg)
{
int n,m=0,p,j,k;
System.out.println(“enter no.”);
Scanner sc=new Scanner(System.in);
n=sc.nextInt();
n=(n/2)-1;
for(int i=1;i<=n;i++)
{
if(i<=((n/2)+1))
{
m=m+i;
p=m;
for(j=1;j<=i;j++)
{
System.out.print(p+” “);
p–;
}//for j
}//if
else
{
k=n+1;
m=m+(k-i);
p=m;
for(j=1;j<=k-i;j++)
{
System.out.print(p+” “);
p–;
}//for j
}//else
System.out.println();
}//for i
}//main
}//class
what is the code ?
*
* *
* * *
* * * *
* * *
* *
*
please can anyone explain the 12345 pyramid logic of the program
enter number of raws: 5
””””’1
””””212
”””32123
”’4321234
543212345
note: the ( ‘ ) are space, space didnt show in the message
1
1a2
1a2a3
1a2a3a4
what is the code for this?
for(int i=1; i<= 4 ;i++){
for(int j=1; j <= i; j++){
if(i!=j)
System.out.print(j+”a”);
else
System.out.print(j);
}
System.out.println(“”);
}
shouldn’t it print like that
12345
2345
345
45
5
??
Add the alphabet in the given String in Java
Eg: String str = “ABCDEF”
Output : AOBOCODOEOF
Please update the code fast.
What is the code for
1 1 1 1 1
2 2 2 2 2
3 3 3 3 3
4 4 4 4 4
5 5 5 5 5
I need the answer as soon as possible
Thankyou
what is the code for the given below program?
5
368
6291
58342
and the total must be 5+8+9+8=30.
Hi,
I need code for
+
+++
+++++
++++++++
public class patternPlus {
public static void main(String[] args) {
int i, j;
for (i = 1; i <= 4; i++) {
for (j = 1; j < (i * 2); j++) {
System.out.print("+");
}
System.out.println(" ");
}
}
}
Hi,
How to write a program for frequency(sot by frequency,not by numeric value)
input:
60
65
50
65
70
70
65
60
65
70
output:
65 4
70 3
60 2
50 1
Hi,
reads a date in yyyy-mm-dd and prints it in words(use appropriate day suffix “st” ,”nd”, “rd”,”th”)
input:
2017-03-04
output:
4th March 2017
Hi,
print number of character,words and lines.
input:
essay.txt
output:
number of character:1365
number of words:93
nuber of lines:44
public class fileReading
{
public static void main(String[] args) throws IOException
{
File file = new File(“Your File path on local disk”);
FileInputStream fileStream = new FileInputStream(file);
InputStreamReader ip = new InputStreamReader(fileStream);
BufferedReader reader = new BufferedReader(ip);
String line;
// Initializing counters
int countWord = 0;
int sentenceCount = 0;
int characterCount = 0;
int paragraphCount = 1;
while((line = reader.readLine()) != null)
{
if(line.equals(“”))
{
paragraphCount++;
}
if(!(line.equals(“”)))
{
characterCount += line.length();
String[] wordList = line.split(“\\s+”);
countWord += wordList.length;
String[] sentenceList = line.split(“[!?.:]+”);
sentenceCount += sentenceList.length;
}
}
System.out.println(“Total word count = ” + countWord);
System.out.println(“Total number of sentences = ” + sentenceCount);
System.out.println(“Total number of characters = ” + characterCount);
System.out.println(“Number of paragraphs = ” + paragraphCount);
}
}
Hi,
plz reply fr Questons.
How do you do this?
Create a Java class that takes 1 number as input, then programmatically outputs an inverted triangle, with the input as the starting number.
I need a code …
1 2 3 4 5
10 9 8 7 6
11 12 13 14 15
can you help me for my c++ pyramid right side 1to5
i need this output
54321
4321
321
help with this code please.
54321
12345
4321
1234
321
123
21
12
I need the code
A
A B 1
A B C 2 2
A B C D 3 3 3
It is a equilateral triangle
2
3 5
7 11 13
17 19 23 29
31 37 41 43 47
please help me to get the output
2
3 5
7 11 13
17 19 23 29
31 37 41 43 47
1 2 3 4 5 6 7 8 9
2 3 4 5 6 7 8
3 4 5 6 7
4 5 6
5
4 5 6
3 4 5 6 7
2 3 4 5 6 7 8
1 2 3 4 5 6 7 8 9
pls answer how to do this
I know im 4 years late
but im having hope
Hi I need a code for
12345
2345
345
45
5
int a =5;
For(int i=1;i<=a;i++){
for(int j=1;j<=i;j++){
System.out.print(j+" ") ;
}
}
I need some help pls
a.) while.html
b.) do-while.html
c.) for.html
2. Implement a loop that will produce this output:
999999999
88888888
7777777
666666
55555
4444
333
22
1
search youtube
543212345
4321 1234
321 123
21 12
1 1
I need a code for this please help
Remember NOT for this
5432112345
4321 1234
321 123
21 12
1 1