Trending ▼   ResFinder  

ICSE − Q & A

475 Users in the Group
Moderator: Trisha Pattnaik  
+Join

Ask a Question

Answer a Question!

ResFinder - Thousands of Practice Papers

Guys i want to print this pattern=>      54321
                                                              4321
                                                                321
                                                                  21
                                                                    1


So i wrote this code


public class HelloWorld
 {
     public static void main(String[] args)
        { int k=0;
            for(int i=5;i>=1;i--)
             {
                 for(int j=i;j>=1;j--)
                  {
                      if(j<5)
                       { 
                           while(k!=i)
                            {
                                System.out.print(" ");
                                k--;
                        
                            }
                            
                  }
                  System.out.print(j);
        }System.out.println();
 }
        }
 }




Is it wrong?
asked by Abhishek Agrawal (agrek) 8 years ago
4

+ 3 more questions by agrek  

how to write a selection sort question  plzz tell really confused
asked by Prateek Rawat (prateek25) 8 years ago
1
http://www.respaper.com/sportysags/6836-pdf.html Can any1 please solve Q7 in this paper
asked by Abhilasha Sreenivasan (abhilasha12) 8 years ago
4
should we write the outputs for the programs???
asked by Vijay Kr (krvijay28) 8 years ago
2

+ 1 more questions by krvijay28  

Guys what u doing now?? Plz don't tell me playing etcetc.. I mean solving papers or reading tb or exactly what I'm confused now..
asked by Abhishek Shyam (abhibenne) 8 years ago
1
WAP to accept n elements in an array and seprate the single digit numbers into 1 array and double digit numbers into another array
Pls help...and giv me the simplest program
asked by Bhavana (mpc123) 8 years ago
2
Any output questions.....plz
asked by Likitha Manjunath (stage2) 8 years ago
0
Prog. for :
6 6 6 6 6 6
5 5 5 5 5
4 4 4 4
3 3 3
2 2
1

Any1 ? Thanks
asked by Aavesh Kumar (aavesh) 8 years ago
4
can anyone say in simple language what valueOf()function does
asked by Adithya Kannan (adiketh198) 8 years ago
1
Guys to all those who have got a confusion in static variables and non-static(instance variables ) i found an interesting example which will easily make you understand the difference.....plz see to it patiently....Worthy...
NON-STATIC Variables (Instance variables) : These variables' values are unique to each object of a class 
Example : the currentSpeed of one BICYCLE is different from the currentSpeed of another
STATIC Variables ( Class variables ) : There is exactly one copy of these variables in existence no matter how many objects have been created for a single class.....
Example : No.of Gears for a particular Bicycle can be marked as static since the same number of gears will apply to any other bicycle too ..( here bicycle refers to objects ...that means no matter what object it might be the value of static variable remains same) ...Keyword final can be attached to them if you want the variable's value to be constant througout....
#HopeItHELPED
asked by MP Harsha (student58) 8 years ago
2

<< Prev

    Page 145    

Next Page >>


© 2010 - 2024 ResPaper. Terms of ServiceContact Us Advertise with us