Return Styles: Pseud0ch, Terminal, Valhalla, NES, Geocities, Blue Moon. Entire thread

One of you geniuses do this for me.

Name: Anonymous 2010-11-06 15:31

Herp derp, how do I do this with lesser code?

#include <iostream>

using namespace std;

int main()
{
    char secret[256];
    cout<<"Enter a super secret code:";
    cin.getline(secret,256);
    cout<<"\n";
    cout<<secret[1];
    cout<<secret[3];
    cout<<secret[5];
    cout<<secret[7];
    cout<<secret[9];
    cout<<secret[11];
    cout<<secret[13];
    cout<<secret[15];
    cout<<secret[17];
    cout<<secret[19];
    cout<<secret[21];
    cin.get();
    return 0;
}

Name: sage 2010-11-06 15:39

Your code is enterprise quality, leave it as it is.

Name: Anonymous 2010-11-06 15:44

>>2
Ok, I'll just leave now.

Name: Anonymous 2010-11-06 16:12

for (int i = 1; i < 22; i += 2)
{
  count<<secret[i];
}


Welcome to ADVANCED LOOPING TECHNIQUES.

Name: Anonymous 2010-11-06 16:14

Use a loop.

Name: Anonymous 2010-11-06 16:16

>>4-kun
means
cout<<secret[i];
Also, use code tags next time, OP.

Name: Anonymous 2010-11-06 16:26

>>4
for (int i = 0; i < 11; i++)
{
  count<<secret[i*2+1];
}

Name: Anonymous 2010-11-06 16:27

shiit[o]
[/o]chan

Name: Anonymous 2010-11-06 16:28

shiiiiit
chan

Name: Anonymous 2010-11-06 16:47


shiit
chan

Name: Anonymous 2010-11-07 0:23

These solutions use too much cout.
[code]
for(int i = 1; i < 22; i += 2)
{
    secret[(i-1)/2] = secret[i];
    secret[i] = 0;
}
Truly enterprise quality.

Name: Anonymous 2010-11-07 0:24

[/code]

Name: Anonymous 2010-11-07 3:22

>>12

good joke

Name: VIPPER 2010-11-07 4:15

>>1
One of you geniuses do this for me.
[#][code][/#][/code]

Use more [code] instead of less [code].

Your welcome NOT!.

JEWS

Name: Anonymous 2010-11-07 4:19

Your welcome

Яeturn to skool, ``faggot''

Name: Anonymous 2010-11-07 7:15

>>7
That's not ADVANCED LOOPING, that's ADVANCED ARRAY INDEX-ACCESSING.

Fix that part aswell.

Name: Anonymous 2010-11-07 12:14

ADVANCED JUMPING TECHNIQUES
section .bss
    b resb 32

section .text
    global _start

fin:
    xor rdi, rdi
    jmp exit
bail:
    mov rdi, 1
exit:
    mov rax, 60
    syscall
    hlt

_start:
    xor rax, rax
    mov rdi, rax
    mov rsi, b
    mov rdx, 256
    syscall
    cmp rax, 0
    jle bail
    xor rbx, rbx
    mov r8, rax
lewp:
    xor rdi, rdi
    inc rdi
    mov rdx, rdi
    mov rax, rdi
    lea rsi, [b + rbx]
    syscall
    inc rbx
    inc rbx
    cmp rbx, 21
    jg fin
    jmp lewp

Newer Posts
Don't change these.
Name: Email:
Entire Thread Thread List