July Systems

www.julysystems.com
Profile Unclaimed

Interview Question

Developer Interview Bangalore (India)

Write program to print 1's diagonaly

  ? 1111111111 111111111 11111111 1111111 111111 11111 1111 111 11 1
Tags:
java program
Answer

Interview Answer

1 Answer

0

Using 2 for loop
for i=10 i>=1 i--
 {
   for j=0 j<=i j++
    System.out.println("1");
 }

Interview Candidate on Jan 8, 2012

Add Answers or Comments

To comment on this, Sign In or Sign Up.