+ 4
I want to print a series 1 to 5
1 12 123 1234 12345
3 Respuestas
+ 11
for (int i=1;i <6;i++)
{
cout<<"\n";
for (j=1;j <i;j++)
{ cout <<j; }
}
+ 10
public class patternhelp{
public static void main (String []args){
for(int a=1;a <=5;a++){
for (int b=1;b<=a;b++)
System.out.print(b);
System.out.println("");
}
}
}
https://code.sololearn.com/c5oI6I06c7P4/?ref=app
+ 4
JavaScript:
for (i=1, serie=""; i<6; i++)
{
serie += i;
console.log(serie + "\r");
}
Welcome.