On Sat, Jan 30, 2010 at 8:27 PM, ibraheem Tasneem <[email protected]> wrote:
> hi everyone,
> plz help me generate the following output:
> 11
> 134
> 1359
> 135716
> 1359
> 134
> 11

Probably me being a bit thick, but that looks like a Mensa question to
which the answer relies on the output of 'pom'.

I can see no mathematical pattern there from which you could derive a
two-loop program.

(My more simplistic answer would be 7 printf()'s to print the output
or a variation thereof.)

> i've tried the following code but it is'nt working, plz modify my code;
>
>
> for (int i=1; i<6;i++)
> {
>     for (int j=1; j<=i; j+=2)
>     {
>         cout <<i<<j ;
>     }
>
> cout <<"\n";
> }


-- 
PJH

http://shabbleland.myminicity.com/ind
http://www.chavgangs.com/register.php?referer=9375

Reply via email to