Jump to content
IceyLava108

Count to 1,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

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now

×