Convert codes and symbols

Assignment Help Software Engineering
Reference no: EM1380049

Could you explain or convert each of the code , symbols used in the following solution?
For example what would "itiny_mce_markerquot; mean for me?
i=1 TO LEN(i$) etc
What would j mean for me? etc
i + 1 TO 1 STEP - 1 etc
MOD 3) = 0 THEN PRINT MID$(i$, i, j) etc

Given a string of numbers, identify all of the substrings that form numbers that are divisible by 3. For example, applying the algorithm on the string 37540 should produce the following substrings (not necessarily in this order): 0; 3; 75; 54; 375; 540

1 i$ = "37540" 'input string
2 FOR i = 1 TO LEN(i$) 'loop from 1 to the length of the input string
3 FOR j = LEN(i$) - i + 1 TO 1 STEP -1
4 'loop from the lenght from this point in the string to the end, down to 1
5 IF (VAL(MID$(i$, i, j)) MOD 3) = 0 THEN PRINT MID$(i$, i, j)
6 'using the modulo function, we check if the particular number is
'evenly divisible by 3
7 NEXT j 'end looping
8 NEXT i 'end looping

For example: 5469
5+4+6+9=24
2+4=6
therefore 5469 is evenly divisible by 3 or 5469 MOD 3 = 0

 

Reference no: EM1380049

Questions Cloud

Define the it governance organization and structure : Define the IT governance organization and structure of each Brief summary of identified key policies as well as procedures of each company
Explain an efficient parallel algorithm : Think about an n-element list in an n-processor EREW parallel random-access machine, where some elements of the list are marked as being blue.
Is you will receive your first interest payment one year : British government has a consol bond outstanding that pays £100 in interest each year. Assuming that current interest rate in Great Britain is 5% also that you will receive your first interest payment one year from now, and then value of consol bo..
Company culture retention and turnover : What would you do to ensure this is done without discrimination - if it must be finished at all? What questions would you ask of the President?
Convert codes and symbols : Given a string of numbers, recognize all of the substrings that form numbers that are divisible by 3. For example, applying the algorithm on the string 37540 should produce following substrings.
After finding inappropriate behaviours on an employee''s : After finding inappropriate behaviours on an employee's Facebook an employer obvious to fire the employee. The employee Facebook is the main reason why she was fire. what is your reaction?
How much will you have at end of six years : When CD period is up, you roll entire balance over into another 3-year CD paying 3.5%. How much will you have at end of 6 years?
Does store security have right to stop peter facts : store security notices that he quickly attempts to leave store. Does store security have right to stop also search Peter according to se facts.
What are few of the problems aecs facing : What are few of the problems AECS facing? Are they essential in its model or they could be rectified while keeping the model intact?

Reviews

Write a Review

Software Engineering Questions & Answers

  Question about vector or bitmap

When your customer hands you a job, how would you make the determination which type of graphic is the right selection, Vector or Bitmap, in your response,

  Recognize different phases of the sdlc

The systems development life cycle (SDLC) is a framework which consists of distinct sequential processes.  Recognize different phases of the SDLC?

  Software engineering fundamental

Software Engineering Fundamental Assignment:  Moving Pictures is an application that captures information about movies, as well as the rating and reviews of movie fans. Interview transcripts regarding it's functionality have been captured as follows..

  Determine the output of the code sequenc

Determine the output of this code sequence? The user successively enters 3, 5, and -1.

  Process of modeling using entity-relationship diagrams

Process of starting with world objects and modeling by using entity-relationship diagrams is referred to as top-down process.

  Office automation and group collaboration software

Create a paper explaining what office automation and group collaboration software is used in your company. Include an review of the drawbacks and benefits of each software used.

  Identify principle viewpoints of specification of system

Identify the principle viewpoints which might be taken into account in the specification of this system and organize these using a viewpoint hierarchy diagram.

  Explanations on fixing c++ code errors

This technique takes an array of ints as a parameter and returns an array of Booleans. For each element in the parameter array whose value is 0,

  Create flowchart to accept length of base of triangle

Create a flowchart that will accept the length of the base and height of a triangle and print the area. Area of a triangle is : area = 1/2b*h ; where b = base and h = height.

  State diagram for coffee machine controller

Design behavioral specs by using state diagram for coffee machine controller given below: State events. Machine operates ah hourly interval.

  What is the standard error

If you have five critical errors, two main faults, and five minor errors, what is the standard error

  Internal events by creatinguml one state diagram

Which event driven modeling can be used to illustrate how system responds to external and/or internal events by creating a UML ONE State Diagram.

Free Assignment Quote

Assured A++ Grade

Get guaranteed satisfaction & time on delivery in every assignment order you paid with us! We ensure premium quality solution document along with free turntin report!

All rights reserved! Copyrights ©2019-2020 ExpertsMind IT Educational Pvt Ltd