felaxJoin Date: 2008-08-07 Post Count: 373 |
Module Module1
Sub Main()
Dim A As Integer
Dim B As Integer
Dim C As Integer
Dim E As Integer
Dim F As Integer
Dim G As Integer
Dim H As Integer
Dim I As Integer
Dim J As Integer
Dim K As Integer
Console.WriteLine("enter number here")
A = Console.ReadLine()
Console.WriteLine("enter number here")
B = Console.ReadLine()
Console.WriteLine("enter number here")
C = Console.ReadLine()
Console.WriteLine("enter number here")
E = Console.ReadLine()
Console.WriteLine("enter number here")
F = Console.ReadLine()
Console.WriteLine("enter number here")
G = Console.ReadLine()
Console.WriteLine("enter number here")
H = Console.ReadLine()
Console.WriteLine("enter number here")
I = Console.ReadLine()
Console.WriteLine("enter number here")
J = Console.ReadLine()
Console.WriteLine("enter number here")
K = Console.ReadLine()
Dim D As Integer
D = A + B + C + E + F + G + H + I + J + K
D = D / 10
Console.WriteLine("The Product")
Console.WriteLine(D)
Console.ReadLine()
End Sub
End Module
use this to add 10 numbers and divide them by 10 have fun |
|
felaxJoin Date: 2008-08-07 Post Count: 373 |
o and if you ever need to use this use VB.Net |
|
|
...
This doesn't belong in this forum. |
|
|
That is one of the most inefficient codes I have ever seen. |
|
|
Sub blah()
do
MsgBox("BLAH!")
loop
End sub
I haven't used VB in a long time, and I got some languages mixed up, so I don't know if that's how it goes. |
|
FoodTestsJoin Date: 2009-05-02 Post Count: 1507 |
Wow you suuure can program. That's tough stuff there.../sarcasm |
|
|
#include "windows.h"
int WINAPI WinMain(HWND hWnd, UINT message, WPARAM wParam, LPARAM lParam)
{
MessageBox(NULL,"Your programming is an epix phail.","Phail bus is here",MB_OK | MB_ICONEXCLAMATION);
return 0;
}
//Ownt. |
|
felaxJoin Date: 2008-08-07 Post Count: 373 |
the program works just how it needs to and btw you people need to learn more about programing because you clearly cant program |
|
GoldenUrgJoin Date: 2009-08-23 Post Count: 6428 |
Now it's Lua.
--Put in LocalScript
--Module Module1
Console = {}
function Console.WriteLine( msg )
local mb = Instance.new( "Message" )
mb.Parent = game.Players.CurrentPlayer
mb.Text = msg
delay( 5, function() mb:Remove() end )
end
function Console.ReadLine()
return game.Players.CurrentPlayer.Chatted:wait()
end
function Main()
Console.WriteLine("enter number here")
A = Console.ReadLine()
Console.WriteLine("enter number here")
B = Console.ReadLine()
Console.WriteLine("enter number here")
C = Console.ReadLine()
Console.WriteLine("enter number here")
E = Console.ReadLine()
Console.WriteLine("enter number here")
F = Console.ReadLine()
Console.WriteLine("enter number here")
G = Console.ReadLine()
Console.WriteLine("enter number here")
H = Console.ReadLine()
Console.WriteLine("enter number here")
I = Console.ReadLine()
Console.WriteLine("enter number here")
J = Console.ReadLine()
Console.WriteLine("enter number here")
K = Console.ReadLine()
D = A + B + C + E + F + G + H + I + J + K
D = D / 10
Console.WriteLine("The Product")
Console.WriteLine(D)
Console.ReadLine()
end
--End Module
Main() |
|
|
Ahh Visual basic code :)! |
|
|
Module Module1
Function WorkoutDigitWord(ByVal Word)
Dim Digits() As String = {"ONE", "TWO", "THREE", "FOUR", "FIVE", "SIX", "SEVEN", "EIGHT", "NINE"}
For i = 0 To Len(Word) - 1
For n = 0 To 8
If Word(i) = Digits(n)(0) Then
Digits(n) = Mid(Digits(n), 2)
End If
If Len(Digits(n)) = 0 Then
Return n + 1
End If
Next
Next
Return "NO"
End Function
Sub Main()
Do
Console.Write("Test Word: ")
Console.WriteLine("{0}", WorkoutDigitWord(UCase(Console.ReadLine())))
Loop Until False
End Sub
End Module |
|
felaxJoin Date: 2008-08-07 Post Count: 373 |
good job were did you find it or did you make it. |
|
|
I wrote it to complete the first question in the Infomatik Olympiad test paper. The first question is called Digit Words and asks you to write a program that can return the numerical digit if it can be found in the word. You were never given a word that had to digits in it.
Bounce
*o*n*e - 1
Entering Bounce would return 1.
Although there are the correct letters, Decode wouldn't return 1 as the letters aren't in the right order.
|
|
chris1989Join Date: 2007-11-30 Post Count: 2520 |
Programming is scripting. |
|
|
class DasAuto
def failz()
puts "You are a good programmer!!!"
end
end
Auto = DasAuto.new
Auto.failz() |
|
|
Uh, Isnt scripting the SAME THING!? |
|
VengroeJoin Date: 2009-02-16 Post Count: 3057 |
Not exactly, scripting is programming, but programming isn't neccesarily scripting. Its like squares and rectangles, or circles and ovals. |
|
gaius19Join Date: 2009-08-03 Post Count: 3159 |
Scripting is a HLL (Higher Level Language) while programming is just writing instructions, so scripting is programming, not the other way around.
For example:
0E1FBA1301B409CD21E4602C8175FAB44CCD2148656C6C6F20576F726C64210D0D0A24
Isn't scripting, but this:
print("Hello World!")
Is. |
|
chris1989Join Date: 2007-11-30 Post Count: 2520 |
Again programming is scripting/scripting in programming. Programs are written with scripting languages the reason they show up as squares and stuff is because there encrypted. Like all the roblox.dll files there all encrypted so you cant read them. |
|
gaius19Join Date: 2009-08-03 Post Count: 3159 |
The boxes don't mean it's really 'encrypted', it's just written in machine language, like the hex codes I printed above. It's the actual processor instructions.
See http://en.wikipedia.org/wiki/Machine_Language if that helps more. |
|
|
Machine lenguage is coded on binariy
1010010101001010010101110101001 |
|
|
gaius19Join Date: 2009-08-03 Post Count: 3159 |
Binary and hex are just representations of the actual memory, how it's actually stored and processed just complicates it, so programmers tend to use something to represent it.
Also I didn't feel like typing loads of binary.
Because REAL programmers use hex. :P
JK, it's just easier for some. |
|
gaius19Join Date: 2009-08-03 Post Count: 3159 |
Oh, and phailbusreturns, you were off by a bit.
1010010101001010010101110101001 <-- Add one here.
¥,J,W and S or R in ascii. |
|
|
import java.awt.*;
import java.awt.event.*;
import javax.swing.*;
class Noob extends JFrame {
public static Noob() {
JTextField t = new JTextField(50);
t.setText("LERN A USEFUL LANGUAGE NOOB");
this.add(t);
}
public static void main(String[] args) {
Noob n = new Noob(); //haha here
}
} |
|