hadde lyst å dele et gammel prosjekt

3 innlegg i emnet

Skrevet

Kom over noe på min gamle maskin, hadde det litt artig i mine yngre dager, så har ikke et problem men bare lyst å dele. kan brukes av alle og kan deles med alle. Gamle minne kom tilbake i dag i allefall :)

 

Declare sub menu
Declare sub plus
Declare sub subtrackt
Declare sub devide
Declare sub multiply

dim namme as string 
Print " "
Print " "
input "  Hi stranger, my name is Calculine, What is your name?" ; namme
Print " "
sleep 2000
cls
Print " "
Print " "
Print "  hi  " ; namme
Print "  So cool you are with the me today, I like to count with apples."
Print " "
sleep 5000
Print " Although I am a little piece of software I do need some help" ; namme", I hope you can help me"
sleep 7000
Print " "
Print " "
Print " This message is for your mom or dad: To ensure your child's counting experience it is important"
Print " that your child understand the use of baskets, and how we move apples between them"
Print " it is also important that they have an understanding of how we can share"
Print " apples between friends or any in the house."
Sleep 10000

menu
sub menu
    cls
    Print "------------------------------------------"
    Print "      Calculine - Elementary            "
    Print "------------------------------------------"
    Dim choice as integer
    
    Print "1: Add apples"
    Print "2: Take away with appel"
    Print "3: Share apple wth friends"
    Print "4: Multiply with appels"
    Input "What do you want to play today?" ; choice
    
    if choice = 1 then
        plus
    elseif choice = 2 then
        subtrackt
    elseif choice = 3 then 
        devide
    elseif choice = 4 then
        multiply
    end if
End Sub 

plus
Sub plus
    cls
    Print "------------------------------------------"
    Print "      Calculine - Elementary            "
    Print "       Add apples                         "
    Print "------------------------------------------"
    Dim num1 as integer
    Dim num2 as integer
    Dim result as integer
        input "How many apples is the first basket?" ; num1
        input "How many apples is the second basket?" ; num2
        result = num1 + num2
            Print " "
            Print " "
            Print "Well, if it is "; num1 ; " apples in the first basket, and"
            Print "there is" ; num2 ; " apples in the second basket, then we have in"
            Print "total" ; result ;" apples in the basket."
            Print " "
            Print "So in the book we will probably write in this way."
            Print " "
            Print " "; num1
            Print "+"; num2
            Print "="; result
            Print " "
            Print " "
            Print "Please hit the biggest long key on your keyboard to return to the main menu."
        sleep
    menu
End sub

subtrackt
sub subtrackt 
    cls
    Print "------------------------------------------"
    Print "      Calculine - Elementary            "
    Print "       Take away with apples                 "
    Print "------------------------------------------"
    Dim num1 as integer
    Dim num2 as integer
    Dim result as integer
        input "How many apples do you have in your basket?" ; num1
        input "How many apple do you want to give to your friend?" ; num2
        result = num1 - num2
            Print " "
            Print " "
            Print "If you want to take" ; num1 ; " apples from you basket to give to you friend, then there will be"; result ; " apple left."
            Print " "
            Print "So in the book we will probably write in this way."
            Print " "
            Print " "; num1
            Print "-"; num2
            Print "="; result
            Print " "
            Print " "
            Print "Please hit the biggest long key on your keyboard to return to the main menu."
            
        sleep
    menu
End sub

devide
Sub devide
    cls
    Print "------------------------------------------"
    Print "      Calculine - Elementary            "
    Print "   Share apples with your friends         "
    Print "------------------------------------------"
    Dim num1 as integer
    Dim num2 as integer
    Dim result as Byte
        input "how many apples do you have in the baskek?" ; num1
        input "How many friends do you have who come to visit?" ; num2
        result = num1 / num2
            Print " "
            Print " "
            Print "If we have " ; num1 ; " apple(s), and we must share" ; num2 ; " friends. It will be"; result ; " apples per person."
            Print " "
            Print "So in the book we will probably write in this way."
            Print num1 ; " /" ; num2 ; "=" ; result 
            Print " "
            Print " "
            Print "Please hit the biggest long key on your keyboard to return to the main menu"
        sleep
    menu
End sub
    
multiply
sub multiply
    cls
    Print "------------------------------------------"
    Print "      Calculine - Elementary            "
    Print "         Multiply with apples             "
    Print "------------------------------------------"
    Dim num1 as integer
    Dim num2 as integer
    Dim result as Longint 
        input "How many apples is each friends going to eat when they get to you?" ; num1
        input "How many friends do you have who come to visit?" ; num2
        result = num1 * num2
            Print " "
            Print " "
            Print "If they eat" ; num1 ; " apples, and it coms " ; num2 ; " friends, you will need"; result ; " apples in the basket."
            Print " "
            Print "So in the book we will probably write in this way."
            Print num1 ; " *" ; num2 ; "=" ; result
            Print " "
            Print " "
            Print "Please hit the biggest long key on your keyboard to return to the main menu."
        sleep
    menu
End sub

sleep  

 

1

Del dette innlegget


Lenke til innlegg
Del på andre sider

Skrevet

Gøyalt, hvilket språk er dette?

0

Del dette innlegget


Lenke til innlegg
Del på andre sider

Skrevet

BASIC om jeg ikke husker feil. Husker jeg så på to youtube videoer for å få dette til. Brukte nåkk en hel helg på dette om jeg kjenner meg selv rett.

0

Del dette innlegget


Lenke til innlegg
Del på andre sider

Opprett en konto eller logg inn for å kommentere

Du må være et medlem for å kunne skrive en kommentar

Opprett konto

Det er enkelt å melde seg inn for å starte en ny konto!


Start en konto

Logg inn

Har du allerede en konto? Logg inn her.


Logg inn nå

  • Hvem er aktive   0 medlemmer

    Ingen innloggede medlemmer aktive