Jump to content
IceyLava108

Count to 2,000

Recommended Posts

5 REM display the number 941

10 LET a$ = "9"

20 LET b$ = "4"

30 LET c$ = "1"

40 LET d$ = a$ + b$ + c$

50 LET number = VAL(d$)

60 PRINT number

 

Share this post


Link to post
Share on other sites

package arraysstrings;
import java.util.Arrays;

public class ArraysStrings {

    public static void main(String[] args) {
        
        // Display the number 942
        
        String[] aryString = new String[3];
        
        aryString[0] = "9";
        aryString[1] = "4";
        aryString[2] = "2";
       
        int i;
       
        for (i = 0; i < aryString.length; i++){
            System.out.println(aryString);
        }

    }
    
}

 

Share this post


Link to post
Share on other sites

liftM2 (*) ((succ (succ 0) +) . (`div` succ (succ 0))) pred (product (((:) =<< sum . (++ [succ (succ 0)])) [succ (succ 0), succ (succ (succ 0))]))

Share this post


Link to post
Share on other sites

 foldl1 (-) (ap map (ap ((:) . sum . ap map ((: [succ 1, 1, 1]) . succ . ($ succ 1))) (return . ($ succ 1))) (length . mapM id . replicate (succ 1) . enumFromTo 1))

 

Share this post


Link to post
Share on other sites

947

 

3 hours ago, Gavin said:

945++

This actually produces the value 945. :teeth:

3 hours ago, Gavin said:

what language is that H20?

I think it's Haskell, but I'm not sure.

Share this post


Link to post
Share on other sites

Which language is used to calculate 943 and 945?

> flip runReader language $ asks id
"Haskell"
pack [label .l -text 948]

 

 

Share this post


Link to post
Share on other sites

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...

×
×
  • Create New...