Re: Starter Java programmer
Oops..Sorry
for the first program the output i want is
Quote:
1
121
12321
1234321
123454321
Re: Starter Java programmer
***?
m neither able to post spaces in the main post nor in the quote...what do i do ??? :((
Re: Starter Java programmer
Mods m extremely sorry for multireplying my own thread...
I can't edit my posts..! :(
Just to tell i wanted the o/p in the screen..! :(
Re: Starter Java programmer
Quote:
Originally Posted by
devilasad
***?
m neither able to post spaces in the main post nor in the quote...what do i do ??? :((
Put it in [CODE]...[/CODE] tags? Use underscores and say you mean spaces?
Experience is a poor teacher: it gives its tests before it teaches its lessons...
Anon.
Re: Starter Java programmer
Quote:
Originally Posted by
dlorde
Put it in
tags? Use underscores and say you mean spaces?
Experience is a poor teacher: it gives its tests before it teaches its lessons...
Anon.
Thnx Anon...helpful..!!:)
this is Expected o/p
Code:
____1
___121
__12321
_1234321
123454321
__ ==> Spaces
:D
Re: Starter Java programmer
The code in your first post is adding a space between each digit but the last example output you posted shows no spaces between the digits, so which one do you want?
If you look at the relationship between the number of spaces required in the first row and the number of rows you are printing and also look at how the number of spaces changes with each row you should be able to work out how to write a for loop to add the spaces.