473,503 Members | 1,691 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

What code is this? What is the output?

3 New Member
I'm a newbie in programmer.

A$ = "TMRAECNRDO"
B$ = ""
For J = 1 to Len(A$) step 2
Print Mid(A$, J, 1)
B$ = B$+Mid(A$, J+1, 1)
Next
Print B$
Dec 19 '07 #1
6 1192
sicarie
4,677 Recognized Expert Moderator Specialist
This is not C or C++. What language is it? Once you know that, you can find a compiler for that language and build it yourself.
Dec 19 '07 #2
arniemateo
3 New Member
This is not C or C++. What language is it? Once you know that, you can find a compiler for that language and build it yourself.
Really? I really don't know what language is this. Thanks anyway.
Dec 20 '07 #3
sicarie
4,677 Recognized Expert Moderator Specialist
It looks like an algorithm to me. It's not Python or Perl (those are generally higher-level languages). My guess is pseudocode.

You can still follow the steps in it to figure out the answer. (That is, going on the assumption that LEN() is "length()" - a function to figure out the length of what is passed to it.)
Dec 20 '07 #4
numberwhun
3,509 Recognized Expert Moderator Specialist
I'm a newbie in programmer.

A$ = "TMRAECNRDO"
B$ = ""
For J = 1 to Len(A$) step 2
Print Mid(A$, J, 1)
B$ = B$+Mid(A$, J+1, 1)
Next
Print B$
I don't know about everyone else, but this looks like a form of BASIC programming. At least, it is certainly reminiscent of it.

Regards,

Jeff
Dec 20 '07 #5
arniemateo
3 New Member
I don't know about everyone else, but this looks like a form of BASIC programming. At least, it is certainly reminiscent of it.

Regards,

Jeff
Thanks Jeff,

Yes, I already figure it out. Its definitely BASIC.

Regards,

Arnie
Jan 3 '08 #6
moishy
104 New Member
I thought so!
You pulled the words out of my... keyboard!

I've once programed a few palm programs in basic using nsBasic by nsbasic.com

The only useful program I made was a frequency program:
You input a frequency (e.g. 255=C) and volume and length, and it will beep it for you according to your specifications!

It's fun to play with and to see which sounds you could, that people ten years older than you CAN'T! 'cuze the older you get, the less you can hear higher frequencies.
Jan 11 '08 #7

Sign in to post your reply or Sign up for a free account.

Similar topics

58
4614
by: Jeff_Relf | last post by:
Hi Tom, You showed: << private const string PHONE_LIST = "495.1000__424.1111___(206)564-5555_1.800.325.3333"; static void Main( string args ) { foreach (string phoneNumber in Regex.Split...
7
1801
by: Neil Zanella | last post by:
OK, this time the compiler's got me a little bit puzzled, simply because it is doing something I am not expecting. My understanding, according to the documentation of std::vector<>::resize(), is...
1
2126
by: Qiangning Hong | last post by:
I decide to seperate my data collection routine from my data analysis and storage program to a seperate process, so I try to use the new subprocess model in Python 2.4. The main program spawns...
10
1150
by: John | last post by:
Hi all, I wrote the code to get the following output: 1 2 3 4 5 6 7 8 9 10 2 3 4 5 6 7 8
1
528
by: Shark | last post by:
What could be the error?? i have a dll for converting vox files to Dll. the structure of the header looks like : ...
24
2662
by: kalamantina | last post by:
#include "stdafx.h" #include <stdio.h> #define output( x ) printf( #x "\r\n" );fflush( stdout ) class CMyBase { public: CMyBase() { output( CMyBase() ); f(*this);
1
2203
by: GAOZH | last post by:
I wrote below code to do calculation. But it donesn't work for negative numbers like if input 4 + ( - 5 ), the program will crash. Any one can help me to modify the code to make it can calculate...
9
11915
by: Cesar | last post by:
Hello there, A java programmer sent me a wsdl file, which I have to use to consume his web methods. When I run the wsld.exe tool to generate the class' code, I get the following message: ...
1
2866
by: aboood | last post by:
Hi guys Could any one tell me what does that code do please? in pseudo-code #include <fstream.h> #include <iostream.h> bool differsByOneDigit ( int , int ); void outputResults ( ofstream & ,...
8
1684
by: wastedhello | last post by:
ok. here are a list of things i cant fix. ive been trying for way to long now. 1. if more then 1000 values are told, will still continue with program. 2. if -max, min, average etc run, and 2...
0
7202
marktang
by: marktang | last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However,...
0
7278
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers,...
0
7328
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven...
0
7458
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
5578
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...
1
5013
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new...
0
4672
by: conductexam | last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and...
0
3167
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The...
1
736
muto222
by: muto222 | last post by:
How can i add a mobile payment intergratation into php mysql website.

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.