+ 2
Challenge#^:
Write a program to print number from 1 to 10 or how much u want in java without using loop. Be creative and think of it. BEST OF LUCK. HAPPY CODING😄😄😇
4 Respuestas
+ 17
public class Program{
static int y=1;
public static void main(String[] args){
returnPat(10);}
static void returnPat(int k){
if(k>=y){System.out.print(y++);returnPat(k);}}
}
/*is recursion allowed ? , if its allowed then its too simple challenge else i'll try later & think some idea to do it without loop ☺*/
//or
System.out.print ("12345678910"); //without loop 😂
+ 1
okay u can take ur time we'll it's easy I know but it will test ur creativity and fundamental well I'm working on it.. Thank u ur inspirational u never lose lose and very active in taking up challenges
0
hello, so any one for a real challenge