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

Pages: 1-

Pseudo Algorithm

Name: Balkanfag 2013-03-31 13:30

It's a basic algorithm that i got half way through.

Write an algorithm that for an entered number from 100 to 10,000 prints if the number has 3, 4 or 5 numbers (Ex. 100, 1000 or 10000)

Algorithm: Proizvod
Start
Read: proizvod, m, n
??? <- 12
proizvod <- 1
While m (Is equal or smaller than) n execute (извршувај)
proizvod (производ) = proizvod + n

What do i do now? Sorry if i didn't translate it well.

Name: Anonymous 2013-03-31 13:37

And what do i put in ???

Name: Anonymous 2013-03-31 13:40

Ask Nikita-kun.

Name: Anonymous 2013-03-31 15:49

#include <stdio.h>
int main(void)
{
    int n;
    printf("Enter a number from 100 to 10000:\n");
    scanf("%d", &n);

    if (n >= 100 && n <= 10000) {

        if (n >= 100 && n <= 999)
            printf("\nThe number has 3 digits\n");
        else if (n >= 1000 && n <= 9999)
            printf("\nThe number has 4 digits\n");
        else if (n = 10000)
            printf("\nThe number has 5 digits\n");
    } else
        printf("\nAre you fucking retarded? I said between 100 and 10000!\n");

    return 0;
}

Name: Balkanfag 2013-03-31 19:23

@4 I didn't want it to be in C++, just in pseudo.

Name: Anonymous 2013-03-31 20:57

>>5

DON'T CALL MY C PROGRAM A PIG DISGUSTING C++ OR I'LL KILL YOU TO DEATH!

APOLOGIZE, IMBECILE!

Name: Anonymous 2013-03-31 21:00


digits = floor . (+1) . logBase 10.0 . fromIntegral
main = getLine >>= digits . print . read


There.

Name: Anonymous 2013-03-31 21:02

Of course, i meant print . digits . read.

Name: Anonymous 2013-04-01 4:38

@5 lrn2lrn

Name: Anonymous 2013-04-01 5:59

You faggots aren't helping at all. I NEED IT IN PSEUDO, BUT IT'S TOO LATE FOR THAT NOW. I DON'T NEED IT IN FUCKING C/C++.

>>9 I'm still learning the basics of C++, i'm in my 1st year of computer science you pleb

Name: Anonymous 2013-04-01 8:57

Check my privilege!

Name: Anonymous 2013-04-01 15:43

>>10
LEEEEEEEEEEEEEEEEEEL XDDDDDDXDXDDDDDXDDDDDD
IHNBT

Name: Anonymous 2013-04-01 17:30

this thread made me laugh hard. is it a school for mentally challenged or what

Name: Balkanfag 2013-04-01 18:51

>>13
You do know what pseudo is right?

Name: Anonymous 2013-04-01 19:17

google knows it all wrong:

начинается с входной n и d счетчик сначала на 1,
петлю, n не менее 10,
установить n при n / 10,
прирост d,
конец цикла,
выход d

Name: Anonymous 2013-04-01 22:08

>>14
pseudo mean i stick my dik in ur butt nerd LOL

Name: Anonymous 2013-04-01 22:08

>>14
Evidently it's something you`re special ed teacher made up.

Name: Anonymous 2013-04-02 0:05

le psudo code xD

Name: Anonymous 2013-04-04 14:29

n << read()
count << 1
while n >= 9
n << n/10
count << count+1
end
print(count)

Name: Anonymous 2013-04-04 16:45

pseudo code
I thought that was called Python

Name: Anonymous 2013-04-04 17:02

>>20
Our pseudo-code was more or less Pascal, back in the days.

Name: Anonymous 2013-04-04 18:00

pseudo dubs

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