To learn more about sorting algorithms, Please visit Learn Algorithms. All topics are well explained with examples and implementation in various languages like Python, Java, C++, C and C#.

rproffitt commented: 8 years late. That could be taken as spam. +0

The Java code should look like this:

import java.util.Scanner;  
public class MyClass {
  public static void main(String[] args) 
  {
        //final int START = 5;
        final int STOP = 500;
        int NUMBER_PER_LINE = 10;
        Scanner val = new Scanner(System.in);
        System.out.println("Enter your value ");
        int START =val.nextInt();
        for(int i = START; i <= STOP; i +=START)    
        {
            System.out.print(i + "  ");
            if(i % NUMBER_PER_LINE == 0)
               System.out.println();
        val.close();
            }
  }
}

To learn more about programming language, I would also suggest visiting: Learn Java

JamesCherrill commented: Rubbish. Still has the original bug! -3
rproffitt commented: Spam much? +0

Look like the C++ code is:

#include <iostream>
using namespace std;
int calculate(int values[], int size) {
  int answer = 0;
  for (int i =0; i< size; i +=1)
  {
    answer += values[i];
  }
  return answer;
}

int main() 
{
  int myArray[5] = {0, 2, 4, 8, 16};
  cout << "The answer is " << calculate(myArray, 5);
}

which can be converted into Python as below:

MyList = [0, 2, 4, 8, 16]
print(sum(MyList))

To learn more about Python, I would suggest visiting: Learn Python

rproffitt commented: 9 years late. That could be taken as spam. -3

`
mark = input("Enter marks: ")

if mark >= 80:
print("A")
elif mark >= 70:
print("B")
elif mark >= 60:
print("C")
elif mark >= 50:
print("D")
else:
print("F")
`
To learn more about Python, I would suggest visiting: Learn Python.

rproffitt commented: Spamming that site will be noticed. +0